Returning old value on update

Поиск
Список
Период
Сортировка
Искать

Returning old value on update

От:
Gerhard Heift <ml-postgresql-20081012-3518@gheift.de>
Дата:
Вложения:
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
FAQ