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

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: pgplsql, how to save row variable to a table row
Дата
Msg-id 2F91EE19-1431-4CC1-B08C-3EA347C8C9A4@pgedit.com
обсуждение исходный текст
Ответ на Re: pgplsql, how to save row variable to a table row  ("josep porres" <jmporres@gmail.com>)
Список pgsql-general
On Mar 26, 2008, at 8:59 AM, josep porres wrote:

>
> INSERT INTO demo_tab SELECT demo_tab_row.*;
>
>
> I tried this before with no success.
> But I realized that it was because a problem with a constraint, no
> warnings about this at all.
> With the detailed insert i've got the constraint error.
> I was using the execute because I had a variable called the same as
> a field, not good, I changed it.
> So now it's working perfectly!!!


You don't need SELECT at all:

INSERT INTO demo_tab VALUES (demo_tab_row.*);


John DeSoi, Ph.D.





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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: PostgreSQL Replication with read-only access to standby DB
Следующее
От: Clodoaldo
Дата:
Сообщение: Re: Reindex does not finish 8.2.6