From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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:14:08 |
Message-ID: | 460abcb10906102114u13898a1cxaebc598ef8c88196@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 11, 2009 at 12:02 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Wednesday 10 June 2009 17:10:42 Tom Lane wrote:
> > Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> writes:
> > > Getting error while trying to insert date with the format
> 'dd-month-yyyy'
> > > , 'day-mm-yyyy' (format which add the space in between the date ) etc..
> >
> > 1. Why are you bothering with the completely pointless to_char call at
> all?
>
> Random guess for entertainment: Oracle applications do this sort of thing
> all
> the time.
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.
>
> > 2. It is not a bug that to_char is capable of emitting formats that
> > won't be read by the standard datetime input converter. If you insist
> > on making a useless conversion to char and back, it's on your head to
> > choose a format setting that will work.
>
> Of course they then also use to_date all the time.
Yes, its we can always use to_date.
--
Rushabh Lathia
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-11 04:34:26 | Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc.. |
Previous Message | Bruce Momjian | 2009-06-11 02:50:37 | Re: pgindent run coming |