Skip site navigation (1) Skip section navigation (2)

Re: Timestamp with libpq

From: Jakob Lechner <jakob(dot)lechner(at)applstrudl(dot)com>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Wilhansen Li <willi(dot)t1(at)gmail(dot)com>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Timestamp with libpq
Date: 2008-10-13 15:43:50
Message-ID: 1223912631.3502.79.camel@vie063.fabagl.fabasoft.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,

Am Montag, den 13.10.2008, 14:59 +0200 schrieb Michael Meskes:

> 
> I doubt this. It might be true for double storage but not for 8 byte integers,
> well that is in the database of course. But I see no reason whatsoever that the
> data is truncated by libpq. 
> 

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 "PQparameterStatus"
"on" or "off" is returned.

I adapted my conversion routine to handle both integer and double
timestamps. Everything works fine now.

Best regards
Jakob

-- 
Jakob Lechner
Research & Development
appl.strudl Software GmbH
Honauerstra├če 4
A-4020 Linz
Tel.: [+43] (70) 60 61 62
Fax: [+43] (70) 60 61 62-609
E-Mail: jakob(dot)lechner(at)applstrudl(dot)com
Web: http://www.applstrudl.com
Handelsgericht Linz, FN 303988 t

In response to

pgsql-interfaces by date

Next:From: Georges.BrefortDate: 2008-10-20 15:06:25
Subject: Retrieving points, arrays, ... with libpq
Previous:From: Michael MeskesDate: 2008-10-13 12:59:29
Subject: Re: Timestamp with libpq

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group