Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIwEr-00007h-V3 for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2019 14:17:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hIwEp-0004nu-LL for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2019 14:17:35 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIwEp-0004nl-Ak for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2019 14:17:35 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIwEm-00061H-40 for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2019 14:17:34 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 4554099378 for ; Tue, 23 Apr 2019 07:17:29 -0700 (PDT) Date: Tue, 23 Apr 2019 07:17:29 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Primary key data type: integer vs identity In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 23 Apr 2019, Peter Devoy wrote: > I think you may have serial already there (indicated by sequence in the the > default value). Peter, As serial is an alias for integer (the actual data type) using integer and specifying it as the primary key works. > If you wish to change to identity columns this should be useful: > https://www.2ndquadrant.com/en/blog/postgresql-10-identity-columns/ Nah, I don't see a reason to change. Identity columns obviously have a benefit for some but not for me. Thanks for the suggestion, Rich