pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Jakob Lechner <jakob.lechner@applstrudl.com>
Cc: Michael Meskes <meskes@postgresql.org>
Cc: Wilhansen Li <willi.t1@gmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Timestamp with libpq
Date: Mon, 13 Oct 2008 14:59:29 +0200
Message-ID: <20081013125929.GA23953@feivel.credativ.de> (raw)
In-Reply-To: <1223901242.3502.54.camel@vie063.fabagl.fabasoft.com>
References: <1223884381.3502.10.camel@vie063.fabagl.fabasoft.com>
	<bc9549a50810130232nf40bfd2l2aee3c8c3ff5ec7e@mail.gmail.com>
	<1223891843.3502.33.camel@vie063.fabagl.fabasoft.com>
	<20081013104627.GA23971@feivel.credativ.de>
	<1223901242.3502.54.camel@vie063.fabagl.fabasoft.com>

> > Is there any reason to use a binary transfer? 
> 
> If I use textual transfer I'm losing precision. E.g. for timestamps the
> returned string from my table is "1955-06-08 00:00:00". Thus I'm
> restricted to timestamps with a granularity of 1 second.

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. 

> > about using ecpg instead of libpq?
> 
> The generic database interface I'm writing is part of a basic library
> used in our project. The interface serves as an abstraction for
> accessing different database servers (Postgres, MSSQL, ...). I'm
> currently working on the postgres implementation of the interface. 
> As far as I've seen using ecpg means to hardcode SQL statements which of
> course can't be done in a generic library.

No, this is not true. You can execute arbitrary statements in ecpg as well.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!



view thread (7+ messages)  latest in thread

Message-ID: <20081013125929.GA23953@feivel.credativ.de>
Permalink:  ../20081013125929.GA23953@feivel.credativ.de/
Also on:    postgresql.org/message-id/20081013125929.GA23953@feivel.credativ.de

 · 

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: meskes@postgresql.org, jakob.lechner@applstrudl.com, willi.t1@gmail.com
  Subject: Re: Timestamp with libpq
  In-Reply-To: <20081013125929.GA23953@feivel.credativ.de>

* 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