Re: [GENERAL] keeping track of date

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема Re: [GENERAL] keeping track of date
Дата
Msg-id 3880A4E9.B1604F20@austin.rr.com
обсуждение исходный текст
Ответ на keeping track of date  (admin <admin@wtbwts.com>)
Список pgsql-general
admin wrote:

> What would be the recommended way to keep track of the date/time a tuple
> was inserted?
>
> Should I be using triggers on insert, or is there an internal variable I
> can use to avoid creating another field?

Here's how I'm doing it:

CREATE TABLE mytable (
    ...
    creation_time  DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

Cheers,
Ed Loehr


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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: [GENERAL] New To List
Следующее
От: Palle Girgensohn
Дата:
Сообщение: What's this: OID IS INVALID. TUPGONE 0.