Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1twNIb-00DXKg-K5 for pgsql-docs@arkaria.postgresql.org; Sun, 23 Mar 2025 15:31:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1twNIZ-000T72-TE for pgsql-docs@arkaria.postgresql.org; Sun, 23 Mar 2025 15:31:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1twNIZ-000T2c-LP for pgsql-docs@lists.postgresql.org; Sun, 23 Mar 2025 15:31:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1twNIY-000h35-0Z for pgsql-docs@lists.postgresql.org; Sun, 23 Mar 2025 15:31:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 52NFVb09554781; Sun, 23 Mar 2025 11:31:37 -0400 From: Tom Lane To: Rene Saarsoo cc: pgsql-docs@lists.postgresql.org Subject: Re: SEQUENCE NAME syntax not documented for ALTER TABLE In-reply-to: References: Comments: In-reply-to Rene Saarsoo message dated "Sun, 23 Mar 2025 11:50:10 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <554779.1742743897.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 23 Mar 2025 11:31:37 -0400 Message-ID: <554780.1742743897@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Rene Saarsoo writes: > The documentation for ALTER TABLE [1] doesn't make it clear that the > following is allowed: > ... > It only references the sequence options allowed in CREATE SEQUENCE or AL= TER > SEQUENCE, unlike the CREATE TABLE [2] documentation, which does > specifically state [3]: Huh? I see ADD GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY SET GENERATED { ALWAYS | BY DEFAULT } DROP IDENTITY [ IF EXISTS ] These forms change whether a column is an identity column or change = the generation attribute of an existing identity column. See CREATE TABLE for details. Where do you see a pointer to CREATE SEQUENCE on that page? regards, tom lane