Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bR6eG-0003Bs-RP for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 23:48:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bR6eF-0003g5-1J for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 23:47:59 +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 1bR6eE-0003fy-GO for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 23:47:58 +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 1bR6eB-00020O-9i for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 23:47:57 +0000 Received: from localhost ([127.0.0.1]:36199 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1bR6e7-00032v-Fo; Sat, 23 Jul 2016 23:47:51 +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: <18501.1469285358@sss.pgh.pa.us> (Tom Lane's message of "Sat, 23 Jul 2016 10:49:18 -0400") Message-ID: <87eg6koste.fsf@news-spur.riddles.org.uk> References: <87wpkcpyud.fsf@news-spur.riddles.org.uk> <18501.1469285358@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Sun, 24 Jul 2016 00:47:51 +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 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