From: Tom Lane <tgl@sss.pgh.pa.us>
To: Albert REINER <areiner@tph.tuwien.ac.at>
Cc: PostgreSQL-SQL <pgsql-sql@postgresql.org>
Subject: Re: Historical dates in Timestamp
Date: Wed, 04 Apr 2001 12:36:53 -0400
Message-ID: <6253.986402213@sss.pgh.pa.us> (raw)
In-Reply-To: <20010404130423.A2180@frithjof>
References: <20010404130423.A2180@frithjof>
"Albert REINER" <areiner@tph.tuwien.ac.at> writes:
> Is it really reasonable to enforce that the number of years is four
> digits at least?
I believe so. Without that cue it's pretty difficult for the timestamp
parser even to figure out which field is intended to be the year, let
alone whether you'd like 1900 or 2000 added to a two-digit year value.
For example, with the default datestyle:
regression=# select '12-5-28'::timestamp;
?column?
------------------------
2028-12-05 00:00:00-05
(1 row)
regression=# select '0012-5-28'::timestamp;
?column?
---------------------
0012-05-28 00:00:00
(1 row)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, areiner@tph.tuwien.ac.at
Subject: Re: Historical dates in Timestamp
In-Reply-To: <6253.986402213@sss.pgh.pa.us>
References: <20010404130423.A2180@frithjof> <6253.986402213@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox