Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxe7e-0000Yi-2R for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2017 19:05:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dxe7d-0007Wy-He for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2017 19:05:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dxe65-0003uM-76 for pgsql-hackers@postgresql.org; Thu, 28 Sep 2017 19:03:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dxe62-0000kE-6a for pgsql-hackers@postgresql.org; Thu, 28 Sep 2017 19:03:44 +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 v8SJ3cCg013132; Thu, 28 Sep 2017 15:03:38 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@postgresql.org Subject: Re: Domains and arrays and composites, oh my In-reply-to: <044f3a1c-9e20-c08b-8f78-c47aa41d7a0c@2ndQuadrant.com> References: <4206.1499798337@sss.pgh.pa.us> <12364.1499973554@sss.pgh.pa.us> <32440.1506618167@sss.pgh.pa.us> <044f3a1c-9e20-c08b-8f78-c47aa41d7a0c@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Thu, 28 Sep 2017 14:58:00 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13130.1506625418.1@sss.pgh.pa.us> Date: Thu, 28 Sep 2017 15:03:38 -0400 Message-ID: <13131.1506625418@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andrew Dunstan writes: > On 09/28/2017 01:02 PM, Tom Lane wrote: >>> I do think that treating a function returning a domain-over-composite >>> differently from one returning a base composite is a POLA. We'd be very >>> hard put to explain the reasons for it to an end user. >> Do you have any thoughts about how we ought to resolve that? > Not offhand. Maybe we need to revisit the decision not to modify the > executor at all. I think it's more of a parse analysis change: the issue is whether to smash a function's result type to base when determining whether it emits columns. Maybe we could just do that in that context, and otherwise leave domains alone. > One thought I had was that we could invent a new return > type of TYPEFUNC_DOMAIN_COMPOSITE so there would be less danger of a PL > just treating it as an unconstrained base type as it might do if it saw > TYPEFUNC_COMPOSITE. Hmm. That would be a way of forcing the issue, no doubt ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers