Re: [GENERAL] Date conversion using day of week - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: [GENERAL] Date conversion using day of week
Date
Msg-id AANLkTim9EPs4VaTVSUkWGOC2RJPyxSj0x_+9ybHhHCBB@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Date conversion using day of week  (Marc Munro <marc@bloodnok.com>)
List pgsql-hackers
On 1 April 2011 02:35, Marc Munro <marc@bloodnok.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.

Cheers,
BJ

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: SSI bug?
Next
From: Bruce Momjian
Date:
Subject: Re: Problem with pg_upgrade?