Skip site navigation (1) Skip section navigation (2)

'Default' troubles again. This time with time :)))

From: Leon <leon(at)udmnet(dot)ru>
To: bughunters <pgsql-bugs(at)postgresql(dot)org>
Subject: 'Default' troubles again. This time with time :)))
Date: 1999-07-18 09:52:58
Message-ID: 3791A3FA.34D647B3@udmnet.ru (view raw or flat)
Thread:
Lists: pgsql-bugs
Hello!

Look at this:

bdb=> create table dd (aa int4, gg timestamp default 'now');
CREATE
bdb=> insert into  dd (aa) values (5);
INSERT 581771 1
bdb=> select * from dd;
aa|gg
--+----------------------
 5|1999-07-18 14:40:02+05    
(1 row)


So far so good. But some seconds later:


bdb=> insert into  dd (aa) values (6);
INSERT 581772 1
bdb=> select * from dd;
aa|gg
--+----------------------
 5|1999-07-18 14:40:02+05
 6|1999-07-18 14:40:02+05
(2 rows)


See? Time haven't changed! And again:


bdb=> insert into  dd (aa) values (123);
INSERT 581773 1
bdb=> select * from dd;
 aa|gg
---+----------------------
  5|1999-07-18 14:40:02+05
  6|1999-07-18 14:40:02+05
123|1999-07-18 14:40:02+05
(3 rows) 

Seems there is lot'a trouble with default values :)

-- 
Leon.


pgsql-bugs by date

Next:From: Tom LaneDate: 1999-07-18 14:27:31
Subject: Re: [BUGS] 'Default' troubles again. This time with time :)))
Previous:From: LeonDate: 1999-07-18 09:47:45
Subject: Re: [BUGS] Frontend coredumps on NOTICE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group