Re: to_timestamp overloaded to convert from Unix epoch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: to_timestamp overloaded to convert from Unix epoch
Date: 2005-06-09 16:33:59
Message-ID: 200506091633.j59GXxL28103@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Updated patch attached with both documentation portions --- applied.

---------------------------------------------------------------------------

Michael Glaesemann wrote:
> Please find attached a patch (diff -c against cvs HEAD) to add a
> function that accepts a double precision argument assumed to be a Unix
> epoch timestamp and returns timestamp with time zone, and accompanying
> documentation.
>
> Usage:
>
> test=# select to_timestamp(200120400);
> to_timestamp
> ------------------------
> 1976-05-05 14:00:00+09
> (1 row)
>
> If regression tests are required, I will produce some. I'd appreciate
> any pointers as to what to look for, as they would be my first attempt
> at writing regression tests.
>
> Regards
>
> Michael Glaesemann
> grzm myrealbox com
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.6 KB

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-06-09 16:39:14 Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,
Previous Message Bruce Momjian 2005-06-09 16:29:52 Re: (8.1) to_timestamp correction (epoch to timestamptz)