Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSG1N-0006EC-PM for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jul 2016 04:00:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSG1N-0001lh-AG for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jul 2016 04:00:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bSG0i-0000zB-23 for pgsql-bugs@postgresql.org; Wed, 27 Jul 2016 03:59:56 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bSG0f-0000i8-Cb for pgsql-bugs@postgresql.org; Wed, 27 Jul 2016 03:59:54 +0000 Received: from localhost ([127.0.0.1]:55361 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1bSG0c-000Ozz-L7; Wed, 27 Jul 2016 03:59:50 +0000 From: Andrew Gierth To: Tom Lane Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly In-Reply-To: <4240.1469583457@sss.pgh.pa.us> (Tom Lane's message of "Tue, 26 Jul 2016 21:37:37 -0400") Message-ID: <8737mvn3ag.fsf@news-spur.riddles.org.uk> References: <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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Wed, 27 Jul 2016 04:59:50 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Tom" == Tom Lane writes: Tom> I didn't much like the "initial_nulls" counter in your patch, but Tom> actually there's no reason we can't just push an all-nulls row Tom> into the tuplestore immediately on seeing a null, the same way as Tom> happens in the last-ditch case at the bottom of Tom> ExecMakeTableFunctionResult. I whacked that around a bit and Tom> pushed it. 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. -- 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