Re: insert values from a ROW object

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Michael Moore <michaeljmoore(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 21:55:55
Message-ID: CAKFQuwbzAMbooJ+vdUb+1gxNO-sWbNFk16HQ5LNGG0X3dJXhKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Kellerer 2016-09-22 22:20:22 Re: insert values from a ROW object
Previous Message Michael Moore 2016-09-22 21:44:07 Re: insert values from a ROW object