Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 648141E16586 for ; Tue, 10 Jan 2012 18:53:15 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RkkZ6-0005dk-4a for pgsql-bugs@postgresql.org; Tue, 10 Jan 2012 22:53:16 +0000 Received: from [204.145.120.229] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RkkYt-0008Kp-84 for pgsql-bugs@postgresql.org; Tue, 10 Jan 2012 22:52:59 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RkkYs-0004gn-TS for pgsql-bugs@postgresql.org; Tue, 10 Jan 2012 22:52:58 +0000 Date: Tue, 10 Jan 2012 22:52:58 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6391: insert does not insert correct value To: pgsql-bugs@postgresql.org From: john.udick@zionsbancorp.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/74 X-Sequence-Number: 32141 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: = 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.