Re: now() and date_trunc() apparently corrupting data - Mailing list pgsql-bugs

From Tom Lane
Subject Re: now() and date_trunc() apparently corrupting data
Date
Msg-id 10087.1047596771@sss.pgh.pa.us
Whole thread Raw
In response to now() and date_trunc() apparently corrupting data  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: now() and date_trunc() apparently corrupting data  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-bugs
Oliver Elphick <olly@lfix.co.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

pgsql-bugs by date:

Previous
From: Oliver Elphick
Date:
Subject: now() and date_trunc() apparently corrupting data
Next
From: Tom Lane
Date:
Subject: Re: bug in numeric log() on 7.1, 7.2.2, 7.2.3