public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Roger Mason <[email protected]>
Cc: [email protected]
Subject: Re: plpgsql select into
Date: Fri, 20 Aug 2021 12:07:40 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
Roger Mason <[email protected]> writes:
> 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)
You selected zero columns (which psql is not very good at displaying :-().
Try
select * into info_table from (select get_info('1043_1')) as info_split;
BTW, that could be simplified a lot:
select * into info_table from get_info('1043_1');
regards, tom lane
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: plpgsql select into
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox