X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5AF1FD9DA5 for ; Fri, 14 Oct 2005 18:04:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03421-05 for ; Fri, 14 Oct 2005 21:04:32 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C9D3FD9CB1 for ; Fri, 14 Oct 2005 18:04:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9EL4a7i007449; Fri, 14 Oct 2005 17:04:36 -0400 (EDT) To: H Hale Cc: pgsql-interfaces@postgresql.org Subject: Re: [GENERAL] binary timestamp conversion In-reply-to: <20051014200002.89011.qmail@web52315.mail.yahoo.com> References: <20051014200002.89011.qmail@web52315.mail.yahoo.com> Comments: In-reply-to H Hale message dated "Fri, 14 Oct 2005 13:00:01 -0700" Date: Fri, 14 Oct 2005 17:04:35 -0400 Message-ID: <7448.1129323875@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/15 X-Sequence-Number: 5777 H Hale 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