Returning old value on update

Поиск
Список
Период
Сортировка
От Gerhard Heift
Тема Returning old value on update
Дата
Msg-id 20090131130312.GA3728@gheift
обсуждение исходный текст
Список pgsql-general
Hello,

is it possible to get the old value of an update, something like this:

INSERT INTO my_table (col) VALUES (2);

UPDATE my_table SET col = 4 RETURNING old.col;

Should give me the 2.

Regards,
  Gerhard

Вложения

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

Предыдущее
От: Roger Leigh
Дата:
Сообщение: Re: Pet Peeves?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Pet Peeves?