Re: WITH x AS (...) and visibility in UPDATE

Поиск
Список
Период
Сортировка
Искать
От
David Johnston
Тема
Re: WITH x AS (...) and visibility in UPDATE
Дата
Msg-id
0D33DFA4-2151-40FB-9123-62F1B63B864B@yahoo.com
Ответ на
Список
Дерево обсуждения
WITH x AS (...) and visibility in UPDATE Peter V <peterv861908@hotmail.com>
Re: WITH x AS (...) and visibility in UPDATE Merlin Moncure <mmoncure@gmail.com>
Re: WITH x AS (...) and visibility in UPDATE Peter V <peterv861908@hotmail.com>
Re: WITH x AS (...) and visibility in UPDATE Merlin Moncure <mmoncure@gmail.com>
Re: WITH x AS (...) and visibility in UPDATE Peter V <peterv861908@hotmail.com>
Re: WITH x AS (...) and visibility in UPDATE David Johnston <polobo@yahoo.com>
Re: WITH x AS (...) and visibility in UPDATE Jack Christensen <jackc@hylesanderson.edu>

> 1) create the copy of the row and return the identifier
> 2) apply updates on the new row identified by the identifier returned in step 1
> 
> If possible, I want to write this in a single command, to avoid overhead and mistakes.
> 
> I tried writing a rewrite rule or before trigger, but it becomes quickly a mess to avoid infinite loops.
> 
> Any ideas are welcome. Thanks.
>                         
> 
Insert into table (cols)
Select ... From table;

As mentioned previously just modify the original row before inserting it into the table as a new record.

David J.
В списке pgsql-general по дате отправления
От: sqldbxdeveloper
Дата:
От: Nigel Heron
Дата:
Сообщение: issue with pg_restore
FAQ