Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-27 Thread Pavel Stehule
Hi I am sending a final review of this patch: 0. this patch implements null fields stripping. It does exactly what was proposed and we would to have this feature in core. It is requested feature for JSON types. 1. there is no problem with patch apply and with compilation - one warning is fixed i

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 04:22 PM, Pavel Stehule wrote: 2014-10-26 21:18 GMT+01:00 Andrew Dunstan >: On 10/26/2014 04:14 PM, Thom Brown wrote: On 26 October 2014 20:07, Andrew Dunstan mailto:and...@dunslane.net>

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 04:14 PM, Thom Brown wrote: On 26 October 2014 20:07, Andrew Dunstan > wrote: On 10/26/2014 03:50 PM, Pavel Stehule wrote: Hi I have a question, what is expected result of null strip of {"a": {"b": null, "c", nul

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Pavel Stehule
2014-10-26 21:18 GMT+01:00 Andrew Dunstan : > > On 10/26/2014 04:14 PM, Thom Brown wrote: > >> On 26 October 2014 20:07, Andrew Dunstan > and...@dunslane.net>> wrote: >> >> >> On 10/26/2014 03:50 PM, Pavel Stehule wrote: >> >> Hi >> >> I have a question, >> >> what is e

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Thom Brown
On 26 October 2014 20:07, Andrew Dunstan wrote: > > On 10/26/2014 03:50 PM, Pavel Stehule wrote: > >> Hi >> >> I have a question, >> >> what is expected result of null strip of >> >> {"a": {"b": null, "c", null"} } >> >> ? >> >> > > Please remember not to top-post. > > The above is not legal json

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 03:50 PM, Pavel Stehule wrote: Hi I have a question, what is expected result of null strip of {"a": {"b": null, "c", null"} } ? Please remember not to top-post. The above is not legal json, so the answer would be an error. cheers andrew -- Sent via pgsql-hackers mailin

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Pavel Stehule
Hi I have a question, what is expected result of null strip of {"a": {"b": null, "c", null"} } ? 2014-10-26 19:59 GMT+01:00 Andrew Dunstan : > > On 10/16/2014 04:12 PM, Pavel Stehule wrote: > >> >> >> 1. missing documentation >> >> 2. I miss more comments related to this functions. This code

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/16/2014 04:12 PM, Pavel Stehule wrote: 1. missing documentation 2. I miss more comments related to this functions. This code is relative simple, but some more explanation can be welcome. 3. why these functions are marked as "stable"? New patch: Docs added, functions marked immut

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-16 Thread Pavel Stehule
Hello I checked this patch. 1. There is a consensus we want this feature. 2. This patch implement just this mentioned feature. There is no objection against design. 3. It is possible to apply this patch and compile without warnings. 4. I tested null stripping on large json, jsonb values withou

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-03 Thread Pavel Stehule
Hi 2014-10-04 1:23 GMT+02:00 Andrew Dunstan : > As discussed recently, here is an undocumented patch for json_strip_nulls > and jsonb_strip_nulls. > It is looking well Regards Pavel > > cheers > > andrew > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make

[HACKERS] strip nulls functions for json and jsonb

2014-10-03 Thread Andrew Dunstan
As discussed recently, here is an undocumented patch for json_strip_nulls and jsonb_strip_nulls. cheers andrew diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 2d00dbe..e9636d8 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jso