Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8rFd-006MKR-Tl for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 01:23:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t8rFa-00Ahlr-Hz for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 01:23:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8rFa-00Ahlj-9j for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 01:23:54 +0000 Received: from gaoxing.magnetkern.de ([167.235.225.147]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t8rFS-000bBb-UQ for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 01:23:53 +0000 Received: from titanium.fritz.box (p200300c26f20ef00264bfefffe54b09c.dip0.t-ipconnect.de [IPv6:2003:c2:6f20:ef00:264b:feff:fe54:b09c]) by gaoxing.magnetkern.de (Postfix) with ESMTPSA id F07D47C80; Thu, 07 Nov 2024 02:24:06 +0100 (CET) Date: Thu, 7 Nov 2024 02:23:44 +0100 From: Jan Behrens To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18693: Column names not set when using SELECT STRICT INTO with RECORD type Message-Id: <20241107022344.eb99b565ecbf01aed919e7cd@magnetkern.de> In-Reply-To: <3305167.1730932202@sss.pgh.pa.us> References: <18693-65968418890877b4@postgresql.org> <3305167.1730932202@sss.pgh.pa.us> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 06 Nov 2024 17:30:02 -0500 Tom Lane wrote: > PG Bug reporting form writes: > [...] > > You have the syntax wrong: what you intended (I presume) is > > SELECT a, b INTO STRICT r FROM (SELECT 'A' AS a, 'B' AS b) AS q; > > With what you wrote, the STRICT is taken as an output column alias of > the outer SELECT, [...] > > regards, tom lane Oooops, my apologies! It totally makes sense now. Thanks for your thorough/helpful response. Regards Jan Behrens