[EMAIL PROTECTED] 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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend