Re: A creepy story about dates. How to prevent it? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: A creepy story about dates. How to prevent it?
Date
Msg-id 200306222047.h5MKl5x15518@candle.pha.pa.us
Whole thread Raw
In response to Re: A creepy story about dates. How to prevent it?  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: A creepy story about dates. How to prevent it?  (Ron Johnson <ron.l.johnson@cox.net>)
Re: A creepy story about dates. How to prevent it?  (Joel Rees <joel@alpsgiken.gr.jp>)
List pgsql-general
Ron Johnson wrote:
> On Sun, 2003-06-22 at 12:46, Bruce Momjian wrote:
> > Ron Johnson wrote:
> > > On Sun, 2003-06-22 at 00:05, Bruce Momjian wrote:
> > > > Bruce Momjian wrote:
> > > > >
> > > > > Reading the subject, "creepy ... dates", that is exactly how I feel
> > > > > about the described current date behavior --- "creepy".
> > > > >
> > > > > Because I have only seen one person defend our current behavior, and
> > > > > many object, I am going to add to TODO:
> > > > >
> > > > >     * Allow current datestyle to restrict dates;  prevent month/day swapping
> > > > >           from making invalid dates valid?
> > > > >     * Prevent month/day swapping of ISO dates to make invalid dates valid
> > > >
> > > > I added a question mark to the first item so we can consider it later.
> > > > Most agreed on the second item, but a few thought the first one might be
> > > > OK as is.
> > >
> > > How about situations where reversing the month and date would
> > > still have "valid but wrong" dates, based upon the LOCALE mask?
> > >
> > > I.e., "05/04/2003" is "05-April-2003" or "04-May-2003", depending
> > > on whether the LOCALE implies "DD/MM/YYYY" or "MM/DD/YYYY".
> > >
> >
> > My assumption is that we already handlle these OK because we base it on
> > datestyle.
>
> According to the OP, no.

Oh, you are right.  We base it on datestyle, rather than locale.  Is it
desiarable to default postgresql.conf datestyle to match the locale?

    #
    #       Locale settings
    #
    # (initialized by initdb -- may be changed)
    LC_MESSAGES = 'C'
    LC_MONETARY = 'C'
    LC_NUMERIC = 'C'
    LC_TIME = 'C'


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: Running pg_dump under vcron
Next
From: Bruce Momjian
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread