| From: | Bryan Klimt <Bryan_Klimt(at)baylor(dot)edu> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | insert rowtype |
| Date: | 2003-05-08 02:23:17 |
| Message-ID: | 071B599C-80FC-11D7-831B-000A95774E48@baylor.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | david | 2003-05-08 03:56:15 | Timestamp index not used |
| Previous Message | The Hermit Hacker | 2003-05-08 01:28:13 | Re: Replication for a large database |