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

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bruno BAGUETTE <pgsql-ml(at)baguette(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?
Date: 2003-09-10 03:28:00
Message-ID: 20030910032800.GB18726@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 10, 2003 at 01:47:20 +0200,
Bruno BAGUETTE <pgsql-ml(at)baguette(dot)net> wrote:
>
> I'm looking for a way to convert a unix timestamp to a PostgreSQL date
> without using ::abstime which seems to be deprecated.

There are other ways to do it, but based on comments from developers
I have seen in the past, abstime isn't going away any time soon.

One other approach would be to multiply a 1 second interval by the
timestamp and add it to a timestamp corresponding to the unix epoch
(00:00:00 on January 1, 1970 if I remember correctly). But your current
method is probably going to be faster.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2003-09-10 03:30:49 Re: State of Beta 2
Previous Message Jonathan Bartlett 2003-09-10 02:56:45 Re: Picture with Postgres and Delphi