On 02.02.2017 01:07, Jim Nasby wrote:
On 2/1/17 8:26 AM, Nikita Glukhov wrote:
Some comments about the code: I think it would be better to
* add function for extraction of scalars from pseudo-arrays
* iterate until WJB_DONE to pfree iterator
I'm not sure what your intent here is, but if the
On 2/1/17 8:26 AM, Nikita Glukhov wrote:
If you find it useful, I can also add support of json and other types,
such as smallint and bigint.
Yes, I'd like to have support for other types and maybe for json.
There's been previous discussion about something similar, which would be
better suppo
On 01.02.2017 14:21,Anastasia Lubennikova wrote:
Now the simplest way to extract booleans and numbers from json/jsonb is
to cast it to text and then cast to the appropriate type: ...
This patch implements direct casts from jsonb numeric (jbvNumeric) to
numeric, int4 and float8, and from jsonb boo
Now the simplest way to extract booleans and numbers from json/jsonb is
to cast it
to text and then cast to the appropriate type:
postgres=# select 'true'::jsonb::text::bool;
bool
--
t
postgres=# select '1.0'::jsonb::text::numeric;
numeric
-
1.0
This patch implements direct