Re: [PATCHES] to_date() validation - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: [PATCHES] to_date() validation
Date
Msg-id 34d269d40809091827le21056co509469c0684f6d55@mail.gmail.com
Whole thread Raw
In response to Re: [PATCHES] to_date() validation  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
On Mon, Sep 8, 2008 at 2:24 AM, Brendan Jurd <direvus@gmail.com> wrote:
> HEAD actually gets this one wrong; in defiance of the documentation it
> returns 2000-09-07.  So, it seems to me that the patch shifts the
> behaviour in the right direction.
>
> Barring actually teaching the code that some nodes (like YYYY) can
> take an open-ended number of characters, while others (like MM) must
> take an exact number of characters, I'm not sure what can be done to
> improve this.  Perhaps something for a later patch?

Sound good to me and I would probably argue that things like MM should
not be hard coded to take only 2 chars...
But then again to play devils advocate I can just as easily do things
like to_char(...) + '30 months'::interval;


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Cleanup of GUC units code
Next
From: Tom Lane
Date:
Subject: Re: pg_regress inputdir