Re: Problem with zero year

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with zero year
Date: 2009-03-17 16:54:08
Message-ID: 10562.1237308848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> The problem is that the 2-digit year check is for <=2 digits, not
> exactly two digits:
> ...
> This leads to some unexpected outputs:

> test=> select '1-1-0'::date;
> date
> ------------
> 2000-01-01

We've interpreted that like that since 7.4, without complaints; and
I think it was an intentional change then (since 7.3 doesn't accept it).
I do not recommend changing it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-03-17 18:02:14 Re: Solaris getopt_long and PostgreSQL
Previous Message Zdenek Kotala 2009-03-17 16:50:05 Re: Solaris getopt_long and PostgreSQL