Re: [BUGS] to_date gives odd results

2007-08-31 Thread Josh Tolley
On 8/31/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Josh Tolley escribió: > > > On Thursday 30 August 2007 21:15, Tom Lane wrote: > > > > to_date and friends are fairly awful in terms of not throwing errors > > > > when the input doesn't really match the format. I think what you > > > > should

Re: [BUGS] to_date gives odd results

2007-08-31 Thread Alvaro Herrera
Josh Tolley escribió: > > On Thursday 30 August 2007 21:15, Tom Lane wrote: > > > to_date and friends are fairly awful in terms of not throwing errors > > > when the input doesn't really match the format. I think what you > > > shoulda got here is a bad-input error. However, somebody's going to >

Re: [BUGS] to_date gives odd results

2007-08-31 Thread Josh Tolley
> On Thursday 30 August 2007 21:15, Tom Lane wrote: > > to_date and friends are fairly awful in terms of not throwing errors > > when the input doesn't really match the format. I think what you > > shoulda got here is a bad-input error. However, somebody's going to > > have to do a major rewrite

Re: [BUGS] to_date gives odd results

2007-08-30 Thread Robert Treat
On Thursday 30 August 2007 21:15, Tom Lane wrote: > Robert Treat <[EMAIL PROTECTED]> writes: > > pagila=# select to_date('05 December 2000', 'DD Month '); > > to_date > > --- > > 0001-12-05 BC > > (1 row) > > > > I can't imagine that's expected behavior bug? > > You needed to sa

Re: [BUGS] to_date gives odd results

2007-08-30 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > pagila=# select to_date('05 December 2000', 'DD Month '); > to_date > --- > 0001-12-05 BC > (1 row) > I can't imagine that's expected behavior bug? You needed to say FMMonth, else it expects fixed-width column. to_date and friends a

[BUGS] to_date gives odd results

2007-08-30 Thread Robert Treat
example from docs: pagila=# select to_date('05 Dec 2000', 'DD Mon '); to_date 2000-12-05 (1 row) slight modification: pagila=# select to_date('05 December 2000', 'DD Month '); to_date --- 0001-12-05 BC (1 row) I can't imagine that's expected behavior bug? o