Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH6nw-0004Zx-J7 for pgsql-novice@arkaria.postgresql.org; Fri, 20 Aug 2021 15:51:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mH6nv-0005OQ-F8 for pgsql-novice@arkaria.postgresql.org; Fri, 20 Aug 2021 15:51:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH6XQ-0004Xh-5O for pgsql-novice@lists.postgresql.org; Fri, 20 Aug 2021 15:34:32 +0000 Received: from esa06.ucs.mun.ca ([134.153.136.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH6XL-0007Pu-Ae for pgsql-novice@postgresql.org; Fri, 20 Aug 2021 15:34:29 +0000 IronPort-SDR: 7bOErAQTXVlaAKXRP3XYtor6vi8uOkdJyGdHXKdB7Qd7wmct8jQMmpZDBhcvyrUOYDZq1br7O0 oYestMqqT8GyCwfrkG1y8RYu0qbo3vNAqeoDpUoiiXPllPPYj/YTfqYXnpuVWuc42HFzUBi6jz Ird3HSbMUCmSbJLwvtgSKC7ZmIjj+LBQ8pndRG/NVcva2QuzE6Owbno06sljFPgSXeAZmix8f0 dxrTEkcD1dqVAukZWWfyOooTox3aJKbd4ltvdxybwZ5OPBAjJ5P2Wv9pHUEupG+K/MjPDWISxW Ibc= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3ApszwG61X+PrpEMPrgKHwXwqjBK0kLtp133?= =?us-ascii?q?Aq2lEZdDV+dMuEm8ey2NQXvCWE6wr5OUtBpTnuAsS9qB/nn6KdgrNxAV7dZm?= =?us-ascii?q?bbUQKTRekI0WKI+VHd8kPFmNJg6Q=3D=3D?= X-IronPort-AV: E=Sophos;i="5.84,338,1620700200"; d="scan'208";a="64308298" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from cpe00fc8db7a323-cm00fc8db7a320.cpe.net.cable.rogers.com (HELO pyrope.local) ([174.117.202.255]) by smtp06.ucs.mun.ca with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2021 13:04:22 -0330 References: <6af818d092cf9afb1f7228bca0cbab03ae17bf4d.camel@cybertec.at> User-agent: mu4e 1.5.6; emacs 27.2 From: Roger Mason Cc: pgsql-novice@postgresql.org Subject: Re: plpgsql select into In-reply-to: <6af818d092cf9afb1f7228bca0cbab03ae17bf4d.camel@cybertec.at> Date: Fri, 20 Aug 2021 13:04:20 -0230 Message-ID: MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Tom & Laurenz, Thanks for your responses. Laurenz Albe writes: > Omit "INTO tabular_info" from the query. > RETURN QUERY already is a destination for the query result. Yes, if I omit the INTO clause I get data returned. So then how do I insert the result of the plpgsql call into a table? This is what happens if I try calling 'select into' in psql: select into info_table from (select get_info('1043_1')) as info_split; SELECT 1288 test=> select * from info_table ; -- (1288 rows) How do I access the data in 'info_table'? Thanks, Roger