Re: New to_timestamp implementation is pretty strict - Mailing list pgsql-hackers

From Robert Haas
Subject Re: New to_timestamp implementation is pretty strict
Date
Msg-id 603c8f070812011100j4d6b990ftd98fbd531f635123@mail.gmail.com
Whole thread Raw
In response to Re: New to_timestamp implementation is pretty strict  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
> For better or worse, we also allow these more questionable inputs:

Wow.  Those are all pretty atrocious.

Even so, it's not clear to me that there's a lot of merit to changing
the behavior.  If to_timestamp() isn't rigorous enough, you can always
stick some additional error checking in front of it; it's easy to
write a regular expression that will only match EXACTLY YYYY-MM-DD if
that's what you want to do.  If to_timestamp() is excessively
pedantic, it forces you into rewriting to_timestamp(), which is a lot
more work.  I probably still wouldn't make it accept anything quite
as... creative... as these examples if starting over, but now that the
existing version is out there, I think breaking backward compatibility
isn't warranted.

...Robert


pgsql-hackers by date:

Previous
From: "Vignesh Raaj"
Date:
Subject: Reg: Nested query
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Statement-level triggers and inheritance