From: | "Adriaan van Os" <postgres(at)microbizz(dot)nl> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2977: dow doesn't conform to ISO-8601 |
Date: | 2007-02-07 10:24:49 |
Message-ID: | 200702071024.l17AOn5I072934@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
The following bug has been logged online:
Bug reference: 2977
Logged by: Adriaan van Os
Email address: postgres(at)microbizz(dot)nl
PostgreSQL version: 8.1.4
Operating system: Mac OS X 10.4.6, intel
Description: dow doesn't conform to ISO-8601
Details:
Section 9.9.1 of the Postgres docs
<http://www.postgresql.org/docs/8.2/interactive/functions-datetime.html>
mentions that the "week" subfield of the date_part function conforms to the
ISO-8601 standard.
The same ISO-8601 standard <http://www.omg.org/docs/ISO-stds/06-08-01.pdf>
defines on page 9 in table-2 of section 3.2.2 that Monday is day 1 and
Sunday day seven. However, the "dow" subfield of the date_part function
returns 0 for Sunday.
You can not, in the same function, ignore ISO-8601 for one subfield and
follow it in another.
Besides, if in the same week Sunday comes before Monday, how can the result
of the "week" and "dow" fields conform to each other ?
If "dow" can not be changed for reasons of backward compatibility, I suggest
a new subfield "dayofweek" that does conform to the standard.
Adriaan van Os
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2007-02-07 10:57:21 | Re: BUG #2977: dow doesn't conform to ISO-8601 |
Previous Message | Steven | 2007-02-07 08:07:46 | BUG #2975: UNIQUE INDEX doesn't work |
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2007-02-07 10:49:17 | LIMIT/SORT optimization |
Previous Message | Simon Riggs | 2007-02-07 08:28:12 | Fast CLUSTER |