Re: binary timestamp conversion

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: binary timestamp conversion
Date: 2009-08-17 20:45:37
Message-ID: 20090817204537.GI5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 17, 2009 at 11:35:41AM +0200, David De Maeyer wrote:
> Being on a FreeBSD box, and having PostgreSQL compiled with default
> options, I am assuming timestamps are encoded as long long (a signed
> long for the date and an unsigned long for the time).

Integer timestamps are the number of microseconds since 2000-01-01,
otherwise it's a double representing the number of seconds since the
same date. I don't know perl well enough to know if what you're doing
is the right thing, but the values you're getting out don't look right
to me.

--
Sam http://samason.me.uk/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2009-08-17 21:02:59 Re: ERROR: attempted to delete invisible tuple
Previous Message Jake Wheat 2009-08-17 20:06:03 SQL and pl/pgsql parser in Haskell