From: Bryan Klimt <Bryan_Klimt@baylor.edu>
To: pgsql-sql@postgresql.org
Subject: insert rowtype
Date: Thu, 8 May 2003 08:58:24 -0500
Message-ID: <22B5FF60-815D-11D7-B60D-000A95774E48@baylor.edu> (raw)
In a plpgsql function, I have a variable of type table%rowtype
I populate the row by calling "select into <variable> * from <table>"
then i change some stuff like "<variable>.<field> := <new value>"
now i want to insert the row into the table as a new row - is there an
easy way to do this?
i know i could do "insert into <table> values ( <variable>.<field 1>,
<variable>.<field 2>, ... );"
but that is a lot of typing, and it seems like there should be an
easier way.
-Bryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: Bryan_Klimt@baylor.edu
Subject: Re: insert rowtype
In-Reply-To: <22B5FF60-815D-11D7-B60D-000A95774E48@baylor.edu>
References: <22B5FF60-815D-11D7-B60D-000A95774E48@baylor.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox