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: Wed, 27 Jul 2016 08:48:52 -0400
Message-ID: <29059.1469623732@sss.pgh.pa.us> (raw)
In-Reply-To: <8737mvn3ag.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>
<4240.1469583457@sss.pgh.pa.us>
<8737mvn3ag.fsf@news-spur.riddles.org.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> I did think about that, but the existing code seems to go out of its way
> to build the tuplestore using the tupdesc obtained from the actual
> function result row, rather than the "expected" tupdesc, and it wasn't
> really obvious why that was.
As I noted in a comment, the key hazard would be that heap_form_tuple
copies the tupdesc's type identifier info into the created composite
Datum, thus possibly leading to a mixture of type IDs in the stored
tuples. But tuplestore stores MinimalTuples which omit that data,
so it doesn't matter. I have a feeling that the existing code here
might've been older than the changes to store MinimalTuples rather
than regular tuple datums in tuplestores; or at least, it was written
with the assumption that that was important.
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: <29059.1469623732@sss.pgh.pa.us>
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> <4240.1469583457@sss.pgh.pa.us> <8737mvn3ag.fsf@news-spur.riddles.org.uk> <29059.1469623732@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