Re: [BUGS] BUG #2977: dow doesn't conform to ISO-8601

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Adriaan van Os <postgres(at)microbizz(dot)nl>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #2977: dow doesn't conform to ISO-8601
Date: 2007-02-18 04:07:44
Message-ID: 200702180407.l1I47ie05111@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches


I have implemented 'isodow' with the attached patch.

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

Peter Eisentraut wrote:
> Am Mittwoch, 7. Februar 2007 11:24 schrieb Adriaan van Os:
> > 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.
>
> I see no such claim there.
>
> > You can not, in the same function, ignore ISO-8601 for one subfield and
> > follow it in another.
>
> I think we have pretty well shown that we can.
>
> > Besides, if in the same week Sunday comes before Monday, how can the result
> > of the "week" and "dow" fields conform to each other ?
>
> They don't.
>
> > If "dow" can not be changed for reasons of backward compatibility, I
> > suggest a new subfield "dayofweek" that does conform to the standard.
>
> That might be reasonable. (Or maybe "isodow".)
>
> --
> Peter Eisentraut
> http://developer.postgresql.org/~petere/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/pgpatches/isodow text/x-diff 5.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message tomas 2007-02-18 16:12:30 Re: BUG #3026: 8.2 FOR DEBIAN !!! plzzzz ^^
Previous Message Skatepark Insaen 2007-02-17 22:36:11 BUG #3026: 8.2 FOR DEBIAN !!! plzzzz ^^

Browse pgsql-patches by date

  From Date Subject
Next Message Jeremy Drake 2007-02-18 06:15:43 Re: patch adding new regexp functions
Previous Message Bruce Momjian 2007-02-18 02:04:29 Re: LIMIT/SORT optimization