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

From: Byron Nikolaidis <byronn(at)insightdist(dot)com>
To: "Krasnow, Greg" <gak(at)hnc(dot)com>
Cc: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>, interfaces postgres <pgsql-interfaces(at)postgreSQL(dot)org>, "pgsql-sql(at)postgreSQL(dot)org" <pgsql-sql(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs
Date: 1998-06-10 19:05:40
Message-ID: 357ED903.265DF2DA@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces 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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Hannu 1998-06-11 08:16:49 Re: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs
Previous Message Krasnow, Greg 1998-06-10 18:36:54 RE: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Lynch 1998-06-10 23:01:27 insert/select returned table
Previous Message Krasnow, Greg 1998-06-10 18:36:54 RE: [INTERFACES] Re: M$-Access'97 and TIMESTAMPs