Louise Catherine <[EMAIL PROTECTED]> writes:
> When I execute this statement : 
> select AGE(TO_DATE('20041101','yyyymmdd'),
> TO_DATE('19991201','yyyymmdd'))

> at postgre 7.3.3, the result :
>  age                   
>  --------------------- 
>  4 years 11 mons 1 day 

With TimeZone set to 'Asia/Jakarta' on a Linux machine, I can reproduce
that behavior in 7.3.* but not 7.4 and later.  I believe this is the
relevant change:

2004-12-01 14:57  tgl

        * src/backend/utils/adt/timestamp.c (REL7_4_STABLE): Fix
        timestamptz_age() to do calculation in local timezone not GMT, per
        bug 1332.

and here is a link to the discussion that prompted the change:
http://archives.postgresql.org/pgsql-bugs/2004-12/msg00013.php

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to