Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: evgeni-klimov(at)yandex(dot)ru
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column
Date: 2018-03-03 17:33:44
Message-ID: 31194.1520098424@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jim Nasby 2018-03-03 19:40:24 Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?
Previous Message PG Bug reporting form 2018-03-03 16:53:36 BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column