Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQyF2-0003GX-6K for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 14:49:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQyF1-0000Cd-4t for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 14:49:23 +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 1bQyF0-0000CH-9z for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 14:49:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQyEx-0001k0-Qe for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 14:49:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6NEnIWl018502; Sat, 23 Jul 2016 10:49:18 -0400 From: Tom Lane To: Andrew Gierth cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7808: unnest doesn't handle nulls in array of composite typescorrectly In-reply-to: <87wpkcpyud.fsf@news-spur.riddles.org.uk> References: <87wpkcpyud.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Sat, 23 Jul 2016 09:25:03 +0100" Date: Sat, 23 Jul 2016 10:49:18 -0400 Message-ID: <18501.1469285358@sss.pgh.pa.us> 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 Andrew Gierth 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