On Sun, 2004-09-19 at 16:09 -0600, Michael Fuhr wrote:
> On Sun, Sep 19, 2004 at 12:31:26PM -0400, Tom Lane wrote:
> > Michael Fuhr <mike@fuhr.org> writes:
> > > The leading space is confusing to_timestamp():
> >
> > > test=> SELECT to_timestamp(' 2004 12 17', 'YYYY MM DD');
> > > to_timestamp
> > > ---------------------
> > > 2171-11-06 06:00:00
> >
> > I'd still say this is a bug. If to_timestamp can't match the input to
> > the pattern, it should throw an error, not silently return garbage.
I already start work on new to_char() that will more paranoid, for now
is enough for right usage follow docs.
Karel
--
Karel Zak
http://home.zf.jcu.cz/~zakkr/