Re: identity columns - Mailing list pgsql-hackers

From Tom Lane
Subject Re: identity columns
Date
Msg-id 19455.1491326924@sss.pgh.pa.us
Whole thread Raw
In response to Re: identity columns  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: logical decoding of two-phase transactions
Next
From: Andres Freund
Date:
Subject: Re: logical decoding of two-phase transactions