Re: RE : How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bruno BAGUETTE" <pgsql-ml(at)baguette(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: RE : How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?
Date: 2003-09-10 13:41:03
Message-ID: 4748.1063201263@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Bruno BAGUETTE" <pgsql-ml(at)baguette(dot)net> writes:
>> Sooner or later we'll probably invent an explicit function to do this
>> conversion.

> I may be wrong but why create a new fonction for unixtimestamp<-->date
> conversion ?

> I think that the to_date() function is the best place to add this kind
> of conversion.

to_date doesn't seem particularly appropriate. There's no use for a
format string in this context, and there isn't any variant of to_date
that accepts an integer as input anyway.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kaare Rasmussen 2003-09-10 14:06:49 7.4 defaulting to ipv6 ?
Previous Message Jules Alberts 2003-09-10 13:27:06 help with TCL function