General Bug Report: Two digit years are inconsistant in psql

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: Two digit years are inconsistant in psql
Date: 1999-05-21 21:37:12
Message-ID: 199905212137.RAA69378@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Keith Paskett
Your email address : keith(dot)paskett(at)sdl(dot)usu(dot)edu

Category : unknown
Severity : non-critical

Summary: Two digit years are inconsistant in psql

System Configuration
--------------------
Operating System : sparc-sun-solaris2.7

PostgreSQL version : 6.4.2

Compiler used : gcc 2.8

Hardware:
---------

Versions of other tools:
------------------------

--------------------------------------------------------------------------

Problem Description:
--------------------
In a date entered as '01-02-03' the last number is used for
the year but entering '33-04-05' the first number is used
for the year.

It turns out that if the first number is a valid day number
(1 to 31) it is used as the day. Otherwise it is used as a
two digit year.

--------------------------------------------------------------------------

Test Case:
----------
create table test (dt date);
insert into test values('01-02-03');
insert into test values('33-04-05');
insert into test values('28-06-07');
select * from test;
dt
----------
01-02-2003
04-05-2033
06-28-2007

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message Fomichev Michael 1999-05-26 01:21:06 Bug or not ?
Previous Message Georgi Georgiev 1999-05-20 09:12:08 Debian Linux install note