insert rowtype

Поиск
Список
Период
Сортировка
От Bryan Klimt
Тема insert rowtype
Дата
Msg-id 22B5FF60-815D-11D7-B60D-000A95774E48@baylor.edu
обсуждение исходный текст
Ответы Re: insert rowtype
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "SZŰCS Gábor"
Дата:
Сообщение: Re: "too clever" when creating SQL functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: seeing type defination..