Re: Integer input functions for date and timestamp

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Integer input functions for date and timestamp
Date: 2010-10-22 19:15:40
Message-ID: 4CC1E2DC.9040809@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan,

> date(year int, month int, day int) returns date
> datetime(year int, month int, day int, hour int, minute int, second
> int) returns timestamp

a) you'd need to rename these.
b) we'd also want the inverse of these, which would be extremely useful.

> Without these functions (or some variation), a user wishing to
> construct a date from integers can only assemble the date into a
> string and then put that string through postgres' datetime parser,
> which is totally perverse.

"Parsers Gone Wild!" ;-)

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2010-10-22 19:20:31 Re: Integer input functions for date and timestamp
Previous Message Brendan Jurd 2010-10-22 19:15:20 Re: Integer input functions for date and timestamp