From: | "Brendan Jurd" <direvus(at)gmail(dot)com> |
---|---|
To: | "Guillaume Lelarge" <guillaume(at)lelarge(dot)info> |
Cc: | "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [GENERAL] ISO week dates |
Date: | 2006-11-06 04:28:03 |
Message-ID: | 37ed240d0611052028o1bd0341fsbfbc3321f5f10f1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
On 10/13/06, Guillaume Lelarge <guillaume(at)lelarge(dot)info> wrote:
> Peter Eisentraut a écrit :
> >
> > There is an inconsistency here: 'IYYY' is the four-digit ISO year, 'IW'
> > is the two-digit ISO week, but 'ID' would be the one-digit ISO
> > day-of-the-week. I'm not sure we can fix that, but I wanted to point
> > it out.
> >
>
> Is there a two digit ISO day of the week ? If not, we should use ID. As
> you say, I don't know what we can do about that. I used Brendan Jurd's
> idea, perhaps he can tell us more on this matter.
>
Thanks for your work so far Guillaume. I agree with Peter, it is
inconsistent to have a one-digit field represented by a two-character
code. However, I don't see a way around it. 'D' is already taken to
mean the non-ISO day-of-week, and 'I' is taken to mean the last digit
of the ISO year (although to be honest I don't see where this would be
useful).
This sort of thing is not unprecedented in to_char(). For example,
the codes 'HH24' and 'HH12' are four characters long, but resolve to a
two-digit result. 'DAY' resolves to nine characters, and so on.
Basically I think we're stuck with ID for day-of-week and IDDD for day-of-year.
I will take a look at implementing 'isoyear' for extract(), and also
start putting together a patch for the documentation. If Guillaume is
still interested in adding the IDDD field to to_char(), wonderful, if
not I will pick up from his ID patch and add IDDD to it.
Regards,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | surabhi.ahuja | 2006-11-06 05:28:52 | upgrade to 8.0.9 |
Previous Message | Premsun Choltanwanich | 2006-11-06 04:08:46 | Header meaning for pg_dump |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2006-11-06 08:25:53 | Re: [HACKERS] Bug in WAL backup documentation |
Previous Message | Tom Lane | 2006-11-06 03:50:40 | Re: Indicate disabled triggers in \d |