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

Re: [HACKERS] Date conversion using day of week

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: marc(at)bloodnok(dot)com
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Steve Crawford <scrawford(at)pinpointresearch(dot)com>, pgsql-general(at)postgresql(dot)org, hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Date conversion using day of week
Date: 2011-03-31 16:07:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers
On 1 April 2011 02:35, Marc Munro <marc(at)bloodnok(dot)com> wrote:
> Just to be clear, the reason I was mixing things in this way was that I
> wanted to validate that the dayname being passed was valid for the
> current locale, and I could find no easier way of doing it.

Ah, I see.  In that case I think to_date would have disappointed you
even if IYYY-IW-DY did work, since the inputs do not appear to be
checked against the localised versions of the day names.  They are
only checked against the hard-coded English names.  to_date and
to_char are asymmetric in this sense -- localisation only happens on
the way out.


In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-03-31 16:07:32
Subject: Re: Problem with pg_upgrade?
Previous:From: Kevin GrittnerDate: 2011-03-31 16:06:30
Subject: Re: SSI bug?

pgsql-general by date

Next:From: salah jubehDate: 2011-03-31 16:19:08
Subject: stack depth limit exceeded
Previous:From: Marc MunroDate: 2011-03-31 15:35:23
Subject: Re: [HACKERS] Date conversion using day of week

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