From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly
Date: Sat, 23 Jul 2016 10:49:18 -0400
Message-ID: <18501.1469285358@sss.pgh.pa.us> (raw)
In-Reply-To: <87wpkcpyud.fsf@news-spur.riddles.org.uk>
References: <E1TurJE-0006Es-TK@wrigleys.postgresql.org>
<87wpkcpyud.fsf@news-spur.riddles.org.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> This bug was reported three and a half years ago and apparently
> ignored... but it came to my attention in the IS NULL discussion.
> This patch doesn't address unnest() explicitly, rather it modifies
> ExecMakeTableFunctionResult to treat an isnull return equivalently to an
> all-nulls tuple.
I do not see how you can propose this, which creates an explicit
equivalence between a plain null and an all-nulls row, and simultaneously
advocate that we change IS NULL to remove its treatment of those things
as equivalent.
I think the theory behind the existing code here is that if the SRF wants
its output to be interpreted as an all-nulls row, it can perfectly well
return an all-nulls row. I wonder whether we should address this by
adjusting unnest's behavior instead.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, andrew@tao11.riddles.org.uk
Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly
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>
* 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