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

From Michael Moore
Subject Re: insert values from a ROW object
Date
Msg-id CACpWLjMgVXOLP7b1rvg=CCjSat8AcCUmptVoSi2uffpsGrA7ew@mail.gmail.com
Whole thread Raw
In response to Re: insert values from a ROW object  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
Thanks David.
Thomas, Yes, in my example the loop is not necessary, but in my real application it is. :-) Thanks.

On Thu, Sep 22, 2016 at 2:55 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Sep 22, 2016 at 2:42 PM, Michael Moore <michaeljmoore@gmail.com> wrote:
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?


INSERT INTO final_rslt VALUES ( (a).* );

David J.


pgsql-sql by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: insert values from a ROW object
Next
From: Michael Moore
Date:
Subject: cvs text to quoted cvs text