Thread: Initializing JsonbValue from cstring

Initializing JsonbValue from cstring

From
Igor Stassiy
Date:
Hi,

Is there a way to initialize JsonbValue from cstring from public c api in postgres 9.4? Without the use of functions declared with PG_FUNCTION_ARGS.

Re: Initializing JsonbValue from cstring

From
Pavel Stehule
Date:
Hi

you can call "input function" - jsonb_in

Jsonb *targetjsonbvar = DatumGetJsonb(DirectFunctionCall1(json_in, CStringGetDatum(cstrvalue)));

Regards

Pavel Stehule



2015-02-13 11:32 GMT+01:00 Igor Stassiy <istassiy@gmail.com>:
Hi,

Is there a way to initialize JsonbValue from cstring from public c api in postgres 9.4? Without the use of functions declared with PG_FUNCTION_ARGS.