From: | Michael Moore <michaeljmoore(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | postgres list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: insert values from a ROW object |
Date: | 2016-09-22 22:38:09 |
Message-ID: | CACpWLjMgVXOLP7b1rvg=CCjSat8AcCUmptVoSi2uffpsGrA7ew@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Thu, Sep 22, 2016 at 2:42 PM, Michael Moore <michaeljmoore(at)gmail(dot)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.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Moore | 2016-09-26 19:23:25 | cvs text to quoted cvs text |
Previous Message | Thomas Kellerer | 2016-09-22 22:20:22 | Re: insert values from a ROW object |