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 1qlC8n-001ger-Bp for pgsql-general@arkaria.postgresql.org; Tue, 26 Sep 2023 17:46:33 +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 1qlC8l-00DmRF-EA for pgsql-general@arkaria.postgresql.org; Tue, 26 Sep 2023 17:46:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlC8l-00DmQo-1X for pgsql-general@lists.postgresql.org; Tue, 26 Sep 2023 17:46:31 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlC8i-006mED-Ff for pgsql-general@lists.postgresql.org; Tue, 26 Sep 2023 17:46:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 38QHkQpH432139; Tue, 26 Sep 2023 13:46:26 -0400 From: Tom Lane To: Ron cc: pgsql-general@lists.postgresql.org Subject: Re: Ad hoc SETOF type definition? In-reply-to: <9707e21e-eed3-3c06-821e-e935eab4c098@gmail.com> References: <9707e21e-eed3-3c06-821e-e935eab4c098@gmail.com> Comments: In-reply-to Ron message dated "Tue, 26 Sep 2023 12:41:05 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <432137.1695750386.1@sss.pgh.pa.us> Date: Tue, 26 Sep 2023 13:46:26 -0400 Message-ID: <432138.1695750386@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > Is there a way to define the SETOF record on the fly, like you do with > RETURNS TABLE (f1 type1, f2 type2)? Doesn't RETURNS TABLE meet the need already? regards, tom lane