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 31194.1520098424@sss.pgh.pa.us
Whole thread Raw
In response to BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column
List pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> CREATE TABLE public.test (id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY
> KEY, s TEXT);
> CREATE TABLE public.test_copy (LIKE public.test INCLUDING ALL);
> ERROR:  MINVALUE (1) must be less than MAXVALUE (-1)

Hm ... works fine for me on a 64-bit Linux machine ... but it fails
as described on 32-bit.  Something in the LIKE code path is shoving
the sequence's maxvalue through a variable with platform-dependent
width, probably of type "long".  No time right now to locate the
exact problem.

            regards, tom lane


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column
Next
From: Jim Nasby
Date:
Subject: Re: BUG #15067: Documentation or behaviour bug with autovacuumthresholds?