On 28 August 2011 00:00, Jeff MacDonald <j...@zoidtechnologies.com> wrote:
> Greetings,
>
> On Saturday, August 27, 2011 11:36:13 AM Dean Rasheed wrote:
>>
>> I'm not sure how best to handle timezones though, since it's
>> hard-coded list probably won't match the timezones PostgreSQL knows
>> about. Maybe that doesn't matter, I'm not sure.
>>
>
> It'll matter when the expression has a result that crosses the DST date. Does
> Postgres have a library that could be used by the parser?
>

On further examination of this and other datetime parsing code, I am
coming to the conclusion that for absolute timestamps the PostgreSQL
code is (IMO) the best and most flexible in terms of accepting a
variety of commons formats.

While getdate.y and others offer better support for relative
timestamps, it seems to come at the cost of poorer support for
absolute timestamps, which for me is a deal-breaker. There are also
other incompatibilities, such as different handling of "today", which
is just likely to lead to confusion.

It may not be worth the effort of trying to get a patch into core
PostgreSQL for this, but given the already excellent absolute
timestamp and interval support, I'm thinking that maybe the best
answer is to just write a userland function that breaks an input
string up into timestamp and interval parts and returns the resulting
timestamp.

Regards,
Dean

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to