Skip site navigation (1) Skip section navigation (2)

date/time formats in 7.2

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Hackers List <pgsql-hackers(at)postgresql(dot)org>, General Postgres List <pgsql-general(at)postgresql(dot)org>
Subject: date/time formats in 7.2
Date: 2001-12-29 03:39:42
Message-ID: (view raw or whole thread)
Lists: pgsql-generalpgsql-hackers
For 7.2, to support some ISO-8601 variants, I'm tightening up the date
delimiter parsing to require the same delimiter to be used between all
parts of a date.

Does anyone use the German date notation for PostgreSQL? If so, what is
the actual format you input? The reasons I'm asking are:

o I had recalled that the format was "", but actually
PostgreSQL emits "".

o By tightening up the parsing, "" would be accepted, but
"", "", etc would not.

o The stricter parsing in this area would allow more general parsing
elsewhere, enabling other variants such as


With these changes, more formats should be correctly handled, including
some edge cases which should have worked but seemed not to; the current
regression tests still all pass. As an example of edge case troubles,
7.1 accepts both of the following:

  timestamp '2001-12-27 04:05:06-08'
  timestamp '2001-12-27 040506 -08'

But rejects the latter if the space before the time zone is removed:

  timestamp '2001-12-27 040506-08'

Comments? Suggestions?

                      - Thomas

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-12-29 03:44:50
Subject: Re: TODO question
Previous:From: Tom LaneDate: 2001-12-29 00:15:08
Subject: Re: TODO question

pgsql-general by date

Next:From: Bruce MomjianDate: 2001-12-29 04:55:19
Subject: Re: Problem (bug?) with like
Previous:From: Nate HaggardDate: 2001-12-28 23:13:11
Subject: trigger is holding up the data

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group