Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs

Поиск
Список
Период
Сортировка
От Byron Nikolaidis
Тема Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs
Дата
Msg-id 357ED903.265DF2DA@insightdist.com
обсуждение исходный текст
Ответы Re: [SQL] Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs  ("Jose' Soares Da Silva" <sferac@bo.nettuno.it>)
Список pgsql-sql

Krasnow, Greg wrote:

> I haven't looked at DATETIME stuff, but does Postgres not have something
> similar to Oracle's SYSDATE?  In Oracle you can set an Oracle DATE column to
> have a default of SYSDATE.  This way Oracle can fill in the column at the
> time an insert is done.
>

Yes, you are right, and I noticed Jose' earlier mail about this on the 'sql'
list.

If you do:

create table x (a timestamp DEFAULT CURRENT_TIMESTAMP, b varchar);

It works AND it puts in the current time at INSERT of the new row.  (I noticed
if you use CURRENT_TIME instead, you get the time you created the table at, for
every row, which is not very useful.)

The only problem is that it doesn't change the value on an UPDATE!

Any thoughts?

Byron


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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: RE: [SQL] Problems with default date 'now'
Следующее
От: lynch@lscorp.com (Richard Lynch)
Дата:
Сообщение: insert/select returned table