Re: binary representation of datatypes - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: binary representation of datatypes
Date
Msg-id 20081021135331.GB6864@feivel.credativ.de
Whole thread Raw
In response to Re: binary representation of datatypes  (Matthieu Imbert <matthieu.imbert@ens-lyon.fr>)
List pgsql-hackers
On Tue, Oct 21, 2008 at 01:37:44PM +0200, Matthieu Imbert wrote:
> Yes microseconds are available in textual mode but i do want to use binary mode. Let me explain why:
> ...
> if i'm correct, it seems obvious that the second scenario is more efficient (and less ugly).

I wouldn't bet on scenario 2 being more efficient. For this you not only need
less conversions but also cheaper conversion. Now I haven't looked at this in
detail, but you might spend a lot of time doing stuff that has only a marginal
effect.

> In scenario 2, when talking about timestamp 'official' format, i mean timestamp expressed as number of microseconds
since
> 2000-01-01. But of course, it only deserves this name 'official' if it is guaranteed to stay the same across
postgresqlversions and
 
> platforms

You shouldn't rely on this. Again I'd recommend using text. 

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-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: automatic parser generation for ecpg
Next
From: "Merlin Moncure"
Date:
Subject: Re: binary representation of datatypes