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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..
Date: 2009-06-11 04:34:26
Message-ID: 27030.1244694866@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-06-11 05:05:24 Re: pgindent run coming
Previous Message Rushabh Lathia 2009-06-11 04:14:08 Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..