[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Pavel Stehule
Hi Stephen Can I help with something, it is there some open question? Regards Pavel 2014-09-08 6:27 GMT+02:00 Stephen Frost sfr...@snowman.net: * Pavel Stehule (pavel.steh...@gmail.com) wrote: ignore_nulls in array_to_json_pretty probably is not necessary. On second hand, the cost is

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: Can I help with something, it is there some open question? I had been hoping for a more definitive answer regarding this option for array_to_json, or even a comment about the change to row_to_json. Andrew- any thoughts on this? (that's what the

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Andrew Dunstan
On 09/11/2014 08:29 AM, Stephen Frost wrote: * Pavel Stehule (pavel.steh...@gmail.com) wrote: Can I help with something, it is there some open question? I had been hoping for a more definitive answer regarding this option for array_to_json, or even a comment about the change to row_to_json.

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Stephen Frost
Andrew, * Andrew Dunstan (and...@dunslane.net) wrote: On 09/11/2014 08:29 AM, Stephen Frost wrote: * Pavel Stehule (pavel.steh...@gmail.com) wrote: Can I help with something, it is there some open question? I had been hoping for a more definitive answer regarding this option for

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Stephen Frost
All, * Stephen Frost (sfr...@snowman.net) wrote: Ok. I'll handle updating both of these to remove the overloading and use default params instead, but I'll only add the 'ignore_null' option to row_to_json. Barring objections or any issues I find as I go back through it, this is what I'm

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Stephen Frost
* Stephen Frost (sfr...@snowman.net) wrote: * Stephen Frost (sfr...@snowman.net) wrote: Ok. I'll handle updating both of these to remove the overloading and use default params instead, but I'll only add the 'ignore_null' option to row_to_json. Barring objections or any issues I find as

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-08 Thread Pavel Stehule
2014-09-08 6:27 GMT+02:00 Stephen Frost sfr...@snowman.net: * Pavel Stehule (pavel.steh...@gmail.com) wrote: ignore_nulls in array_to_json_pretty probably is not necessary. On second hand, the cost is zero, and we can have it for API consistency. I'm willing to be persuaded either way on

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-07 Thread Stephen Frost
Pavel, All, * Pavel Stehule (pavel.steh...@gmail.com) wrote: Thank you I made a few minor adjustments, but the bigger issue (in my view) is what to do about array_to_json_pretty- seems like we should do the same there, no? Perhaps you could propose a new patch which incorporates my minor

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-07 Thread Pavel Stehule
Hi 2014-09-08 5:48 GMT+02:00 Stephen Frost sfr...@snowman.net: Pavel, All, * Pavel Stehule (pavel.steh...@gmail.com) wrote: Thank you I made a few minor adjustments, but the bigger issue (in my view) is what to do about array_to_json_pretty- seems like we should do the same there, no?

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-07 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: ignore_nulls in array_to_json_pretty probably is not necessary. On second hand, the cost is zero, and we can have it for API consistency. I'm willing to be persuaded either way on this, really. I do think it would be nice for both array_to_json

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-05 Thread Jeevan Chalke
On Thu, Sep 4, 2014 at 11:41 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sory too much patches :) Patch looks good to me. Marking Ready for Committer. Thanks Regards Pavel -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-05 Thread Pavel Stehule
Thank you Regards Pavel 2014-09-05 8:29 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: On Thu, Sep 4, 2014 at 11:41 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sory too much patches :) Patch looks good to me. Marking Ready for Committer. Thanks Regards

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-04 Thread Pavel Stehule
I am sory too much patches Regards Pavel 2014-09-04 7:35 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, You have attached wrong patch. Thanks -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-03 Thread Jeevan Chalke
Hi Pavel, Here are few more comments on new implementation. 1. /* - * SQL function row_to_json(row) + * SQL function row_to_json(row record, pretty bool, ignore_nulls bool) */ In above comments, parameter name row should changed to rowval. 2. -DATA(insert OID = 3155 ( row_to_json

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-03 Thread Pavel Stehule
Hi 2014-09-03 9:27 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, Here are few more comments on new implementation. 1. /* - * SQL function row_to_json(row) + * SQL function row_to_json(row record, pretty bool, ignore_nulls bool) */ In above comments, parameter

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-03 Thread Jeevan Chalke
Hi Pavel, You have attached wrong patch. Thanks -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-02 Thread Jeevan Chalke
Hi Pavel, it needs a redesign of original implementation, we should to change API to use default values with named parameters but it doesn't help too much (although it can be readable little bit more) instead row_to_json(x, false, true) be row_ro_json(x, ignore_null := true) it is not

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-02 Thread Pavel Stehule
Hello 2014-09-02 13:54 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, it needs a redesign of original implementation, we should to change API to use default values with named parameters but it doesn't help too much (although it can be readable little bit more)

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-02 Thread Pavel Stehule
2014-09-03 7:05 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: Hello 2014-09-02 13:54 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, it needs a redesign of original implementation, we should to change API to use default values with named parameters but it doesn't

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-01 Thread Jeevan Chalke
Hi Pavel, Patch does look good to me. And found no issues as such. However here are my optional suggestions: 1. Frankly, I did not like name of the function row_to_json_pretty_choosy. Something like row_to_json_pretty_ignore_nulls seems better to me. 2. To use ignore nulls feature, I have to

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-01 Thread Pavel Stehule
2014-09-01 12:33 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, Patch does look good to me. And found no issues as such. However here are my optional suggestions: 1. Frankly, I did not like name of the function row_to_json_pretty_choosy. Something like

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-08-22 Thread Jeevan Chalke
Hi Pavel, You have said that XMLFOREST has something which ignores nulls, what's that? Will you please provide an example ? I am NOT sure, but here you are trying to omit entire field from the output when its value is NULL. But that will add an extra efforts at other end which is using output of

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-08-22 Thread Pavel Stehule
Hello 2014-08-22 12:21 GMT+02:00 Jeevan Chalke jeevan.cha...@enterprisedb.com: Hi Pavel, You have said that XMLFOREST has something which ignores nulls, what's that? Will you please provide an example ? I was partially wrong - XMLFOREST ignore null always postgres=# select xmlforest(10

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-06-28 Thread Pavel Stehule
Hello I am sending small patch, that allows ignore nulls in row_to_json function. It allow significant size reduction of generated JSON documents. Regards Pavel 2014-05-25 7:53 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: Hello In Czech Postgres mailing list was user request for