Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AF48164FD24 for ; Mon, 13 Oct 2008 12:44:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90115-08; Mon, 13 Oct 2008 12:44:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fabaglexfr.fabasoft.com (fabaglexfr.fabasoft.com [192.84.221.196]) by postgresql.org (Postfix) with ESMTP id 3A32364FD16; Mon, 13 Oct 2008 12:44:21 -0300 (ADT) Received: from FABAMAIL.fabagl.fabasoft.com ([10.10.5.136]) by fabaglexfr.fabasoft.com with InterScan Messaging Security Suite; Mon, 13 Oct 2008 17:43:36 +0200 Received: from 192.168.121.105 ([192.168.121.105]) by FABAMAIL.fabagl.fabasoft.com ([10.10.5.135]) with Microsoft Exchange Server HTTP-DAV ;Mon, 13 Oct 2008 15:44:14 +0000 Received: from vie063 by FABAMAIL.fabagl.fabasoft.com; 13 Oct 2008 17:43:51 +0200 Subject: Re: Timestamp with libpq From: Jakob Lechner Reply-To: jakob.lechner@applstrudl.com To: Michael Meskes Cc: Wilhansen Li , pgsql-interfaces@postgresql.org In-Reply-To: <20081013125929.GA23953@feivel.credativ.de> References: <1223884381.3502.10.camel@vie063.fabagl.fabasoft.com> <1223891843.3502.33.camel@vie063.fabagl.fabasoft.com> <20081013104627.GA23971@feivel.credativ.de> <1223901242.3502.54.camel@vie063.fabagl.fabasoft.com> <20081013125929.GA23953@feivel.credativ.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Organization: appl.strudl Software GmbH Date: Mon, 13 Oct 2008 17:43:50 +0200 Message-Id: <1223912631.3502.79.camel@vie063.fabagl.fabasoft.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.0 (2.8.0-33.el5) X-imss-version: 2.051 X-imss-result: Passed X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:2 C:3 M:2 S:3 R:4 (0.1500 0.1500) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/9 X-Sequence-Number: 6810 Hi, Am Montag, den 13.10.2008, 14:59 +0200 schrieb Michael Meskes: >=20 > I doubt this. It might be true for double storage but not for 8 byte inte= gers, > well that is in the database of course. But I see no reason whatsoever th= at the > data is truncated by libpq.=20 >=20 I found an easy solution for my problem: Libpq provides information if the timestamps are double values or integer values. When passing the parameter "integer_datetimes" to the function "PQparameter= Status" "on" or "off" is returned. I adapted my conversion routine to handle both integer and double timestamps. Everything works fine now. Best regards Jakob --=20 Jakob Lechner Research & Development appl.strudl Software GmbH Honauerstra=C3=9Fe 4 A-4020 Linz Tel.: [+43] (70) 60 61 62 Fax: [+43] (70) 60 61 62-609 E-Mail: jakob.lechner@applstrudl.com Web: http://www.applstrudl.com Handelsgericht Linz, FN 303988 t