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

Re: Fixed length datatypes. WAS [GENERAL] UUID's as

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mark(at)mark(dot)mielke(dot)cc
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Thomas Hallgren <thomas(at)tada(dot)se>, Josh Berkus <josh(at)agliodbs(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as
Date: 2006-06-30 17:59:26
Message-ID: 25576.1151690366@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
mark(at)mark(dot)mielke(dot)cc writes:
> It depends how it is used. If the memory location needs to be
> allocated, for the value to be used only a few times, the overhead of
> allocation and redirection can be more expensive. If many though, than
> the reduction in value copying can make the pointer faster. 64-bytes,
> and 128-bytes are just on the line of not being clearly one or the
> other. It was just a thought though. The PostgreSQL API seemed pretty
> fixed the last time I looked at this stuff.

Yeah, changing the definition of Datum is probably out of the question ;-)
as it'd break not only most of core but every external module in existence.
Anything bigger than a "long" has to be pass-by-reference.  The
efficiency argument is wrong anyway, as we've optimized the heck out of
those code paths; very little actual copying happens unless a new value
is getting generated.  Pushing pointers around is definitely faster than
pushing multiword values around.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Marko KreenDate: 2006-06-30 21:29:25
Subject: [RFC] txid: module for 64-bit external transaction IDs
Previous:From: Jim C. NasbyDate: 2006-06-30 17:45:13
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as

pgsql-general by date

Next:From: David FetterDate: 2006-06-30 18:01:19
Subject: Re: Notes on converting from MySQL 5.0.x to PostgreSQL
Previous:From: Jim C. NasbyDate: 2006-06-30 17:45:13
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as

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