BUG #6391: insert does not insert correct value - Mailing list pgsql-bugs

From john.udick@zionsbancorp.com
Subject BUG #6391: insert does not insert correct value
Date
Msg-id E1RkkYs-0004gn-TS@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #6391: insert does not insert correct value  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: BUG #6391: insert does not insert correct value  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6391
Logged by:          John
Email address:      john.udick@zionsbancorp.com
PostgreSQL version: 8.4.1
Operating system:   CentOS
Description:=20=20=20=20=20=20=20=20

I would expect that at the time/date of the of now() and clock_timestamp()
to be equal; which they are. However for the insert this is not true.

select localtimestamp::date, now()::date, clock_timestamp()::date

"2012-01-10";"2012-01-10";"2012-01-10"

multiple row insert:
insert into v002235.array_stg values (1, date_trunc('hours',now()),
current_date, array['101','113'], 'Y')
                                   , (2, localtimestamp::date, current_date
, array['101','113'], 'Y')
                                   , (3, now(), clock_timestamp()::DATE,
array['101','113'], 'Y')


Results
1;"1999-12-31";"1999-12-31";"{101,113}";"Y"
2;"1999-12-31";"1999-12-31";"{101,113}";"Y"
3;"1999-12-31";"2012-01-10";"{101,113}";"Y"

Why is this not the case? I would expect that my records should all have the
same value, not some arbitrary date from the past.

pgsql-bugs by date:

Previous
From: maxim.boguk@gmail.com
Date:
Subject: BUG #6393: cluster sometime fail under heavy concurrent write load
Next
From: vic@nix.kh.ua
Date:
Subject: BUG #6392: leak memory while restore/load dump