From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, 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-19 17:44:28 |
Message-ID: | 200702191744.l1JHiSw15345@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
Updated version applied. I reduced the numering changes for the macros.
There was also documentation text for "dow" and a few others that said
"(for <type>timestamp</type> values only)", but in fact the field worked
for "timestamptz" and "date" too, so I removed the mentions. If people
get confused, I will come up with new wording, like "doesn't work for
interval or time", which I think is pretty obvious. I remember people
got confused in the past about this, so maybe we still need something.
---------------------------------------------------------------------------
Bruce Momjian wrote:
>
> 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. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
--
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 |
---|---|---|
/rtmp/diff | text/x-diff | 7.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Arjen van der Meijden | 2007-02-19 18:52:23 | BUG #3031: PHP (and others?) cannot close a connection when "in" a COPY-statement |
Previous Message | Dr. Axel Reimann | 2007-02-19 13:43:18 | BUG #3030: Unable to query SQL_WCHAR column via ODBC |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-02-19 17:51:42 | Re: [PATCHES] WIP patch - INSERT-able log statements |
Previous Message | Guillaume Smet | 2007-02-19 17:31:53 | Re: [PATCHES] WIP patch - INSERT-able log statements |