Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column
Date
Msg-id 26456.1520278713@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identitycolumn  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identitycolumn  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Mar 05, 2018 at 12:44:32AM -0500, Tom Lane wrote:
>> Going forward, maybe we should change the T_Integer case to either int64
>> or int32, so that it's not got a platform-dependent range.

> Serial columns using bigint as type would need int64 anyway, no?  Why
> int32?

int32 might be less work to make fully portable.  I don't recall exactly
what-all we do with T_Integer, but if we try to do sscanf() to produce the
value for instance, that's a problem.  (Note that configure's tests for
64-bit support only cover sprintf, not sscanf.)

Certainly int64 would be a more forward-looking choice, it just seems
like possibly more work.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Greg Clough
Date:
Subject: RE: BUG #15067: Documentation or behaviour bug with autovacuumthresholds?
Next
From: PG Bug reporting form
Date:
Subject: BUG #15099: View Filtered Rows