Skip site navigation (1) Skip section navigation (2)

Re: Integer input functions for date and timestamp

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Integer input functions for date and timestamp
Date: 2010-10-22 19:12:54
Message-ID: AANLkTinrREOZ=ECnAuAT3RtqFoG3q+4quEDquYiCLQvb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Oct 22, 2010 at 2:45 PM, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
> date(year int, month int, day int) returns date
> datetime(year int, month int, day int, hour int, minute int, second
> int) returns timestamp
>
> 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.
>
> Is there any interest in adding this to core, or failing that,
> contrib?  If so I'd be happy to provide a patch including the
> functions themselves and some attendant documentation.

I think that would be useful.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Brendan JurdDate: 2010-10-22 19:15:20
Subject: Re: Integer input functions for date and timestamp
Previous:From: fazool meinDate: 2010-10-22 19:08:54
Subject: xlog.c: WALInsertLock vs. WALWriteLock

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group