Re: How to get Transaction Timestamp ?

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: How to get Transaction Timestamp ?
Дата
Msg-id CABRT9RAKjN-aXKmutE6LZw7XJZW_1M19j_o_doiaqXxNS+JCcQ@mail.gmail.com
обсуждение исходный текст
Ответ на How to get Transaction Timestamp ?  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Ответы Re: How to get Transaction Timestamp ?
Список pgsql-general
On Fri, Sep 16, 2011 at 21:39, Raghavendra
<raghavendra.rao@enterprisedb.com> wrote:
> We can get a Transaction ID, but not the transaction timestamp when it
> performed.

Short answer: You can't. Instead, add a new "timestamptz default
now()" column, that will get you the time of the insert.

If you want the update time, create a BEFORE UPDATE ON x FOR EACH ROW
trigger on this table to update it.

Regards,
Marti

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

Предыдущее
От: Tareq Tajkeh
Дата:
Сообщение: ...
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: RES: Foreign PostgreSQL server