Initializing JsonbValue from cstring

Started by Igor Stassiyabout 11 years ago2 messagesgeneral
Jump to latest
#1Igor 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
<http://doxygen.postgresql.org/fmgr_8h.html#adf4dec9b7d23f1b4c68477affde8b7ff&gt;
.

I posted the following question earlier, but received no reply. Please have
a look:

"postgresql jsonb processing with c api
</messages/by-id/CAKVOjex6wtQmVFZSMX5vWHgFc3YymPp2dQNkCpPCbaUk+1pOUg@mail.gmail.com&gt;
"

/messages/by-id/CAKVOjex6wtQmVFZSMX5vWHgFc3YymPp2dQNkCpPCbaUk+1pOUg@mail.gmail.com

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Igor Stassiy (#1)
Re: Initializing JsonbValue from cstring

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>:

Show quoted text

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
<http://doxygen.postgresql.org/fmgr_8h.html#adf4dec9b7d23f1b4c68477affde8b7ff&gt;
.

I posted the following question earlier, but received no reply. Please have
a look:

"postgresql jsonb processing with c api
</messages/by-id/CAKVOjex6wtQmVFZSMX5vWHgFc3YymPp2dQNkCpPCbaUk+1pOUg@mail.gmail.com&gt;
"

/messages/by-id/CAKVOjex6wtQmVFZSMX5vWHgFc3YymPp2dQNkCpPCbaUk+1pOUg@mail.gmail.com