Re: now() and date_trunc() apparently corrupting data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: now() and date_trunc() apparently corrupting data
Date: 2003-03-13 23:06:11
Message-ID: 10087.1047596771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> This is with -configure -enable-integer-datetime in 7.3.2, i386 Linux
> platform. Is anyone else seeing this? If so, does it happen without
> --enable-integer-datetime?

> junk=# select * from mt;
> v
> -------------
> 06:25:00+00
> (1 row)

> junk=# select * from mt where v < now();
> v
> -------------
> 00:00:00+00 <-- data has been changed...
> (1 row)

I think this is explained by this bug:

2003-02-13 12:04 tgl

* src/backend/utils/adt/date.c (REL7_3_STABLE): Prevent timetz2tm()
from scribbling on its input in HAVE_INT64_TIMESTAMP case.

Can you try it with CVS tip (either HEAD or REL7_3_STABLE branch)?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-03-14 00:22:12 Re: bug in numeric log() on 7.1, 7.2.2, 7.2.3
Previous Message Oliver Elphick 2003-03-13 22:03:37 now() and date_trunc() apparently corrupting data