Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 4/3/17 14:19, Andres Freund wrote:
> + *op->resvalue = Int64GetDatum(nextval_internal(op->d.nextvalueexpr.seqid, false));
>> Is it guaranteed that the caller expects an int64? I saw that
>> nextvalueexpr's have a typeid field.
> It expects one of the integer types. We could cast the result of
> Int64GetDatum() to the appropriate type, but that wouldn't actually do
> anything.
Uh, really? On 32-bit platforms, int64 and int32 datums have entirely
different representations.
regards, tom lane