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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-hackers by date

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