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

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: evgeni-klimov(at)yandex(dot)ru, 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 19:55:41
Message-ID: 87po4lkkaj.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

>> ERROR: MINVALUE (1) must be less than MAXVALUE (-1)

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

The Value node's "ival" field is declared as a long.

sequence_options thinks it can put all the sequence parameters through
makeInteger and have them come out intact.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2018-03-04 00:12:52 Re: BUG #14941: Vacuum crashes
Previous Message Jim Nasby 2018-03-03 19:40:24 Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?