Re: Importing data w/ Unix timestamp - Mailing list pgsql-general

From Ed Loehr
Subject Re: Importing data w/ Unix timestamp
Date
Msg-id 395B8CCC.A2756957@austin.rr.com
Whole thread Raw
In response to Importing data w/ Unix timestamp  (brianb-pggeneral@edsamail.com)
List pgsql-general
Thomas Lockhart wrote:
>
> > insert into RealTable select uname, timestamp(abstime(timeinAsInt4)),
> >                              duration, etc from TempTable;
>
> Another side comment: afaik an explicit conversion to abstime is not
> required to go from Unix time to timestamp. So
>
>   insert into RealTable select uname, timestamp(timeinAsInt4),
>                                duration, etc from TempTable;
>
> should be equivalent.

Neat.  BTW, the documentation on date/time functions at

    http://www.postgresql.org/docs/postgres/x2876.htm

does not hint at this capability.

Regards,
Ed Loehr

pgsql-general by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Importing data w/ Unix timestamp
Next
From: "Mitch Vincent"
Date:
Subject: Trigger question.. (Heaptuple struct)