Re: pgplsql, how to save row variable to a table row

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: josep porres <jmporres(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgplsql, how to save row variable to a table row
Date: 2008-03-26 12:08:25
Message-ID: 47EA3CB9.6070001@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 26/03/2008 11:59, josep porres wrote:

> row_tempf.field1 := value1;
> row_tempf.field2 := value3;
> ...
> row_tempf.fieldN := valueN;
>
> -- NOW INSERT row_tempf in the associated table
> -- ???

Easy! -

insert into <tablename> ( <column> ... )
values (row_tempf.field1, row_tempf.field2, ... );

:-)

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message josep porres 2008-03-26 12:14:07 Re: pgplsql, how to save row variable to a table row
Previous Message Magnus Hagander 2008-03-26 12:06:51 Re: Install Postgresql on Win2000 with Admin Rights