Re: Integer input functions for date and timestamp - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Integer input functions for date and timestamp
Date
Msg-id 4CC1E2DC.9040809@agliodbs.com
Whole thread Raw
In response to Integer input functions for date and timestamp  (Brendan Jurd <direvus@gmail.com>)
Responses Re: Integer input functions for date and timestamp
List 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
 


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Integer input functions for date and timestamp
Next
From: Brendan Jurd
Date:
Subject: Re: Integer input functions for date and timestamp