Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esB2f-0005TH-4X for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Mar 2018 17:33:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1esB2d-0003h2-GI for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Mar 2018 17:33:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esB2d-0003gt-9u for pgsql-bugs@lists.postgresql.org; Sat, 03 Mar 2018 17:33:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esB2a-0005r0-3C for pgsql-bugs@lists.postgresql.org; Sat, 03 Mar 2018 17:33:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w23HXisZ031195; Sat, 3 Mar 2018 12:33:44 -0500 From: Tom Lane To: evgeni-klimov@yandex.ru cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column In-reply-to: <152009601619.21242.262498029671910378@wrigleys.postgresql.org> References: <152009601619.21242.262498029671910378@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Sat, 03 Mar 2018 16:53:36 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31193.1520098424.1@sss.pgh.pa.us> Date: Sat, 03 Mar 2018 12:33:44 -0500 Message-ID: <31194.1520098424@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= 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