Re: Problem in converting int to timestamp value - why?

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Soeren Gerlach <soeren(at)all-about-shift(dot)com>, List pgsql-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: Problem in converting int to timestamp value - why?
Date: 2004-09-20 09:20:34
Message-ID: 1095672034.2836.24.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)fuhr(dot)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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message lists 2004-09-20 13:55:17 Weird behavior with selects and composite data types
Previous Message Shridhar Daithankar 2004-09-20 08:51:50 Re: using schemas to create a virtual DB?