pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: H Hale <hhale21@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [GENERAL] binary timestamp conversion
Date: Fri, 14 Oct 2005 17:04:35 -0400
Message-ID: <7448.1129323875@sss.pgh.pa.us> (raw)
In-Reply-To: <20051014200002.89011.qmail@web52315.mail.yahoo.com>
References: <20051014200002.89011.qmail@web52315.mail.yahoo.com>

H Hale <hhale21@yahoo.com> writes:
> I save 1970-01-01 00:00:00 and read it back expecting
> the difference between postgres and unix epochs but
> get different results each time. 

> (After conversion to host byte order).

Sounds to me like you're picking up garbage rather than the data you
should.  Does your code to fetch the binary value produce correct
answers on an ordinary int8 column?

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <7448.1129323875@sss.pgh.pa.us>
Permalink:  ../7448.1129323875@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7448.1129323875@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hhale21@yahoo.com
  Subject: Re: [GENERAL] binary timestamp conversion
  In-Reply-To: <7448.1129323875@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox