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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: ignore null fields in not relation type composite type based constructors
Date: 2014-09-11 18:10:35
Message-ID: 20140911181034.GE16422@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew,

* Andrew Dunstan (andrew(at)dunslane(dot)net) wrote:
> On 09/11/2014 08:29 AM, Stephen Frost wrote:
> >* Pavel Stehule (pavel(dot)stehule(at)gmail(dot)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 ping on IRC is for :).
>
> The change in row_to_json looks OK, I think. we're replacing an
> overloading with use of default params, yes? That seems quite
> reasonable, and users shouldn't notice the difference.

Right. Great, thanks.

> There might be a case for optionally suppressing nulls in
> array_to_json, and it might work reasonably since unlike SQL arrays
> JSON arrays don't have to be regular (if nested they are arrays of
> arrays, not multi-dimensional single arrays). OTOH I'm not sure if
> it's worth doing just for the sake of orthogonality. If someone
> wants it, then go for it.

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.

Thanks again!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-11 18:14:09 Re: [REVIEW] Re: Compression of full-page-writes
Previous Message Stephen Frost 2014-09-11 18:08:27 Re: proposal (9.5) : psql unicode border line styles