Neil Conway <neilc@samurai.com> writes:
> Interesting. Is there a reason why int8 is pass-by-reference?
Pass-by-value types have to fit into Datum.
On a 64-bit machine (ie, one where pointers are 64-bits anyway) it would
make sense to convert int8 (and float8 too) into pass-by-value types.
If the machine does not already need Datum to be 8 bytes, though, I
think that widening Datum to 8 bytes just for the benefit of these two
datatypes would be a serious net loss. Not to mention that it would
just plain break everything on machines with no native 8-byte-int
datatype.
One of the motivations for the version-1 function call protocol was to
allow the pass-by-value-or-by-ref nature of these datatypes to be hidden
from most of the code, with an eye to someday making this a
platform-specific choice.
regards, tom lane