Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc.. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..
Date
Msg-id 27030.1244694866@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..  (Rushabh Lathia <rushabh.lathia@gmail.com>)
List pgsql-hackers
Rushabh Lathia <rushabh.lathia@gmail.com> writes:
> I thought when we are providing the different format into to_char for
> datetime then  standard datetime input converters should also have the
> capability to read that format.

to_char is designed to support a near-infinite number of output formats,
including many that are necessarily ambiguous.  There is no intention
whatsoever that they all be readable by the input converters.

It might or might not be useful to adjust the input converters to read
the specific format you chose.  But "to_char produced it" is simply not
an interesting argument in favor of that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..
Next
From: Andrew Dunstan
Date:
Subject: Re: pgindent run coming