Re: Timestamp with libpq
От | Michael Meskes |
---|---|
Тема | Re: Timestamp with libpq |
Дата | |
Msg-id | 20081013125929.GA23953@feivel.credativ.de обсуждение исходный текст |
Ответ на | Re: Timestamp with libpq (Jakob Lechner <jakob.lechner@applstrudl.com>) |
Ответы |
Re: Timestamp with libpq
|
Список | pgsql-interfaces |
> > 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!
В списке pgsql-interfaces по дате отправления: