Default Timestamp 'Now' bug with 7.4 on Panther. - Mailing list pgsql-bugs

From Harry Hochheiser
Subject Default Timestamp 'Now' bug with 7.4 on Panther.
Date
Msg-id 0D406079-5D99-11D8-BDC7-0003938AD324@nih.gov
Whole thread Raw
Responses Re: Default Timestamp 'Now' bug with 7.4 on Panther.
List pgsql-bugs
Running Postgres 7.4 on Panther, there seems to be a problem with
setting a timestamp column to have a default of 'now':

createdb test

create table bar (date timestamp DEFAULT 'now');
insert into bar DEFAULT VALUES;
insert into bar DEFAULT VALUES;
insert into bar DEFAULT VALUES;
insert into bar DEFAULT VALUES;

select * from BAR;


output:

             date
----------------------------
  2004-02-12 15:17:38.838411
  2004-02-12 15:17:38.838411
  2004-02-12 15:17:38.838411
  2004-02-12 15:17:38.838411

All rows have the same timestamp, as if 'now' was interpreted at the
time of table creation, not at the time of insertion.

thanks,

Harry

Harry Hochheiser, Ph.D.
Image Informatics and Computational Biology Unit
Laboratory of Genetics
NIH, National Institute on Aging
333 Cassell Drive
Suite 3000
Baltimore MD 21224
410 558 8046

pgsql-bugs by date:

Previous
From: Garrett Dangerfield
Date:
Subject: copy problem
Next
From: Tom Lane
Date:
Subject: Re: Problem with datatype REAL using the = (EQUAL) operator