Re: insert values from a ROW object - Mailing list pgsql-sql

From Thomas Kellerer
Subject Re: insert values from a ROW object
Date
Msg-id ns1lg6$hir$1@blaine.gmane.org
Whole thread Raw
In response to insert values from a ROW object  (Michael Moore <michaeljmoore@gmail.com>)
List pgsql-sql
Michael Moore schrieb am 22.09.2016 um 23:42:
> for a in select * from temp_rslt
> loop
>    insert into final_rslt select row(a.*);
> end loop;
>
> I want to do something like the above. I don't want to have to name each 'a.' variable.
> Is it possible?
>

No need for a loop:
  insert into final_rsl  select *  from tmp_rslt;

This assumes that both table define the columns in the exact same order








pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: insert values from a ROW object
Next
From: Michael Moore
Date:
Subject: Re: insert values from a ROW object