Re: is this my date problem

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Theodore Petrosky <tedpet5(at)yahoo(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: is this my date problem
Date: 2003-10-02 14:42:50
Message-ID: 20031002144250.GA13041@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Thu, Oct 02, 2003 at 10:04:39AM -0400, Tom Lane wrote:
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> > The to_timestamp() do nothing with date/time and use internal
> > tm2timestamp() routine only. I don't think that check all date/time
> > ranges in to_timestamp() is good idea if it's already implemented at
> > the another place in our code.
>
> But it evidently *isn't* checked. As of CVS tip:
>
> regression=# select to_timestamp('44 October 2003', 'DD FMMonth YYYY');
> to_timestamp
> ------------------------
> 2003-11-13 00:00:00-05
> (1 row)
>
> The regular timestamp input converter certainly has the checks:
>
> regression=# select '44 October 2003'::timestamp;
> ERROR: invalid input syntax for type timestamp: "44 October 2003"

Sure, because it check date/time parsers and there isn't common way
how check it if you don't use there parses.

OK, I will add 'tm' struct checker to my TODO for 7.5

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-10-02 14:46:36 Re: 7.3.4: memory leak in fe-exec.c:279 (realloc)
Previous Message Tom Lane 2003-10-02 14:04:39 Re: is this my date problem