On Apr 16, 2009, at 7:29 AM, ShuA wrote:
Could someone post an example how to LOOP through row fields to wrap
them into 'VALUES(...,,)' list?
If you declare record or table row types, you can insert the values
using (rec.*), something like this:
create or replace function test ()
returns void as $$
declare
rec record;
begin
for rec in select * from whatever loop
insert into some_table values (rec.*);
end loop;
end;
$$ language plpgsql;
John DeSoi, Ph.D.
--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql