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

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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: /pgpatches/isodow
Description: text/x-diff (5.3 KB)

In response to

Responses

pgsql-bugs by date

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

pgsql-patches by date

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

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