Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxe2A-0008Tf-BD for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2017 18:59:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dxe29-0000xg-NK for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2017 18:59:41 +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 1dxe0c-0006ef-GA for pgsql-hackers@postgresql.org; Thu, 28 Sep 2017 18:58:06 +0000 Received: from mail-yw0-x22e.google.com ([2607:f8b0:4002:c05::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dxe0Z-0006fp-KB for pgsql-hackers@postgresql.org; Thu, 28 Sep 2017 18:58:05 +0000 Received: by mail-yw0-x22e.google.com with SMTP id w9so1688608ywi.11 for ; Thu, 28 Sep 2017 11:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9x5cjjjrzF7rsua/xnWoptjfAyAHRpa3iZMbBtDsM9o=; b=cAM8vGkRXMqvfDfUQDYnbJOy+2y16bhTujcqPCIrk6jXmt0BZkkDNINTb2HROwNCbU OS4K3qBxN4vcta0SWRGumeFjL6K5kY0r9wPUPkScdkf1uvvTIcuvE+y7NBqLAC7oFwL1 nNyF6uFH4eS0QBXQ+ZR6nvehbUAsSnxRVokeO6ksl3DPNzQ3nBlpPXvg1Y6IXNSLtstv 5zLryo11NU5n7geJ3ZZGFs1tGy+9ssZuuvUmlGsGSviva1+U31WTg7jAgp7nirm3SXVy piOdYdj6ARFCBfvFg1970ENyKuJexFpNIKQtFoZV7LDzyOijue+gsehZ86aXJWFHa3CO bqQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9x5cjjjrzF7rsua/xnWoptjfAyAHRpa3iZMbBtDsM9o=; b=tpK3ExP7hwe/W0l/uNAleLYibn/hfHl+6n7fdPH12AX0w/cE0fziNGH+gldtIsA/mX myL+fxXx+8Ev2qeP7iGKUGgGGgmSPW6Ny5VD64z7M3IY/O8km7inK7Qixh7dnSUURhXU wL+vF8R5JyIUwc/j16ho+nG0wevy7zwapQJzR5VHq1TrrwI887zfL7RhZiCGpyJh6RXX t3n3D+6z8NwSBBWfqTFXO8zSI+VbuYzVWKAXjVaE83gBnkZBMGLwNpP1M/CgAPLriW5a Je/Bp+58gy4z6x5Xw39NLmYBHvBUzk9l+XtcOaLvKzPl0DODvhKN0D8U5kz0CcLxei9R 3U9w== X-Gm-Message-State: AHPjjUiPEQhuMaHOTk3udgb3XWHL3aiOE6XPHlI9jHQfimDACE5klLF6 BzdVx8PZ9XiMw8mOicLLnO4GOv3Vmv++iDqEF9kycCqLXhC+3ch8XNFeV04l1IAivP20HRs7Tj1 LLwlkgtCOmGaOr1DBhZfunCRD2OmtRhq/Y/46gP1X78fJVgjtK6xd9aT30l488LacLqzrlPe2SF 2DyvNfrTmiuZxI X-Google-Smtp-Source: AOwi7QB2dPhafbT8Utjso37k40YMnTk4F4izZ2Ph7HLQoO02i3YM02ECrLT8luowPr4ltqQt0AhBrg== X-Received: by 10.129.122.131 with SMTP id v125mr4509230ywc.48.1506625082073; Thu, 28 Sep 2017 11:58:02 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id p6sm944874ywp.85.2017.09.28.11.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 11:58:01 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Domains and arrays and composites, oh my To: Tom Lane Cc: pgsql-hackers@postgresql.org References: <4206.1499798337@sss.pgh.pa.us> <12364.1499973554@sss.pgh.pa.us> <32440.1506618167@sss.pgh.pa.us> Message-ID: <044f3a1c-9e20-c08b-8f78-c47aa41d7a0c@2ndQuadrant.com> Date: Thu, 28 Sep 2017 14:58:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <32440.1506618167@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-MW 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 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. Obviously that would make the patch a good deal more invasive ;-(  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. Maybe I'm wrong, but I have a strong suspicion that of we leave it like this now we'll regret it in the future. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers