pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly
Date: Sun, 24 Jul 2016 00:47:51 +0100
Message-ID: <87eg6koste.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <18501.1469285358@sss.pgh.pa.us>
References: <E1TurJE-0006Es-TK@wrigleys.postgresql.org>
	<87wpkcpyud.fsf@news-spur.riddles.org.uk>
	<18501.1469285358@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> I do not see how you can propose this, which creates an explicit
 Tom> equivalence between a plain null and an all-nulls row, and
 Tom> simultaneously advocate that we change IS NULL to remove its
 Tom> treatment of those things as equivalent.

Because the proposal to change IS NULL is a discussion point that I'm
not dogmatically committed to.

 Tom> I think the theory behind the existing code here is that if the
 Tom> SRF wants its output to be interpreted as an all-nulls row, it can
 Tom> perfectly well return an all-nulls row.  I wonder whether we
 Tom> should address this by adjusting unnest's behavior instead.

One problem with changing unnest() is that it makes the operation
array(select unnest(a)) return an array that's not equal to the original
one (and which takes up a lot more space if there are many nulls). This
is far more likely to break existing code than simply allowing what was
previously an error case to work.

-- 
Andrew (irc:RhodiumToad)


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (8+ messages)  latest in thread

Message-ID: <87eg6koste.fsf@news-spur.riddles.org.uk>
Permalink:  ../87eg6koste.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87eg6koste.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us
  Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly
  In-Reply-To: <87eg6koste.fsf@news-spur.riddles.org.uk>
  References: <E1TurJE-0006Es-TK@wrigleys.postgresql.org> <87wpkcpyud.fsf@news-spur.riddles.org.uk> <18501.1469285358@sss.pgh.pa.us> <87eg6koste.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox