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 1esvwX-00048z-3q for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Mar 2018 19:38:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1esvwV-00034i-NK for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Mar 2018 19:38:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esvwV-00034Z-EJ for pgsql-bugs@lists.postgresql.org; Mon, 05 Mar 2018 19:38:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esvwT-0000oy-1M for pgsql-bugs@lists.postgresql.org; Mon, 05 Mar 2018 19:38:38 +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 w25JcXvZ026457; Mon, 5 Mar 2018 14:38:33 -0500 From: Tom Lane To: Michael Paquier cc: Andrew Gierth , evgeni-klimov@yandex.ru, pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column In-reply-to: <20180305061325.GF2266@paquier.xyz> References: <152009601619.21242.262498029671910378@wrigleys.postgresql.org> <31194.1520098424@sss.pgh.pa.us> <87po4lkkaj.fsf@news-spur.riddles.org.uk> <20180304235654.GA32165@paquier.xyz> <87lgf7l6sj.fsf@news-spur.riddles.org.uk> <21016.1520228672@sss.pgh.pa.us> <20180305061325.GF2266@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Mon, 05 Mar 2018 15:13:25 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26455.1520278713.1@sss.pgh.pa.us> Date: Mon, 05 Mar 2018 14:38:33 -0500 Message-ID: <26456.1520278713@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier 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