jsquery_extract.c
static void
debugValue(StringInfo buf, JsQueryItem *v)
{
	char   *s;
	int		len;

	switch(v->type)
	{
		case jqiNull:
			appendStringInfo(buf, "null");
			break;
		case jqiString:
			s = jsqGetString(v, &len);
			appendStringInfo(buf, "\"");
			appendBinaryStringInfo(buf, s, len);
			appendStringInfo(buf, "\"");
			break;
		case jqiBool:
			appendStringInfo(buf, jsqGetBool(v) ? "true" : "false");
			break;
		case jqiNumeric:
			s = DatumGetCString(DirectFunctionCall1(numeric_out,
					 PointerGetDatum(jsqGetNumeric(v))));
			appendStringInfoString(buf, s);
			break;
		default:
			elog(ERROR,"Wrong type");
			break;
	}
}
/*
 * Debug print of jsquery value.
 */
Debug print of jsquery value.
Debug print of jsquery value .
static void
debugValue(StringInfo buf, JsQueryItem *v)
{
	char   *s;
	int		len;
	switch(v->type)
	{
		case jqiNull:
			appendStringInfo(buf, "null");
			break;
		case jqiString:
			s = jsqGetString(v, &len);
			appendStringInfo(buf, "\"");
			appendBinaryStringInfo(buf, s, len);
			appendStringInfo(buf, "\"");
			break;
		case jqiBool:
			appendStringInfo(buf, jsqGetBool(v) ? "true" : "false");
			break;
		case jqiNumeric:
			s = DatumGetCString(DirectFunctionCall1(numeric_out,
					 PointerGetDatum(jsqGetNumeric(v))));
			appendStringInfoString(buf, s);
			break;
		default:
			elog(ERROR,"Wrong type");
			break;
	}
}
static void debugValue ( StringInfo buf , JsQueryItem * v ) { char * s ; int len ; switch ( v -> type ) { case jqiNull : appendStringInfo ( buf , " " ) ; break ; case jqiString : s = jsqGetString ( v , & len ) ; appendStringInfo ( buf , " \" " ) ; appendBinaryStringInfo ( buf , s , len ) ; appendStringInfo ( buf , " \" " ) ; break ; case jqiBool : appendStringInfo ( buf , jsqGetBool ( v ) ? " " : " " ) ; break ; case jqiNumeric : s = DatumGetCString ( DirectFunctionCall1 ( numeric_out , PointerGetDatum ( jsqGetNumeric ( v ) ) ) ) ; appendStringInfoString ( buf , s ) ; break ; default : elog ( ERROR , " " ) ; break ; } }
Debug print of jsquery value.
Debug print of jsquery value .