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 1sYRpF-00BRXx-TA for pgsql-docs@arkaria.postgresql.org; Mon, 29 Jul 2024 14:58:13 +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 1sYRpD-000Tk6-L7 for pgsql-docs@arkaria.postgresql.org; Mon, 29 Jul 2024 14:58:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sYRpD-000Tjy-DX for pgsql-docs@lists.postgresql.org; Mon, 29 Jul 2024 14:58:11 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sYRpA-0025Iz-PG for pgsql-docs@lists.postgresql.org; Mon, 29 Jul 2024 14:58:10 +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 46TEw6iV2585955; Mon, 29 Jul 2024 10:58:06 -0400 From: Tom Lane To: "David G. Johnston" cc: "elionescu@yahoo.com" , "pgsql-docs@lists.postgresql.org" Subject: Re: incorrect (incomplete) description for "alter domain" In-reply-to: References: <172225092461.915373.6103973717483380183@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Mon, 29 Jul 2024 05:56:17 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2585953.1722265086.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 29 Jul 2024 10:58:06 -0400 Message-ID: <2585954.1722265086@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Monday, July 29, 2024, PG Doc comments form > wrote: >> In the Synopsis section of >> https://www.postgresql.org/docs/current/sql-alterdomain.html >> this is incorrect (incomplete): >> "ALTER DOMAIN name ADD domain_constraint [ NOT VALID ]" >> It should be >> "ALTER DOMAIN name ADD CONSTRAINT domain_constraint [ NOT VALID ]" > The definition of =E2=80=9Cdomain_constraint=E2=80=9D includes the optio= nal =E2=80=9Cconstraint > constraint_name=E2=80=9D clause. Though reading the page and seeing the= number of > times we say =E2=80=9Calter domain add constraint=E2=80=9D I even more i= nclined to agree > that bringing the word constraint there is desirable. I am not a huge f= an > of the indirect syntax references anyway. I think the page is technically correct, but I'm inclined to duplicate this text from the CREATE DOMAIN page: where domain_constraint is: [ CONSTRAINT constraint_name ] { NOT NULL | NULL | CHECK (expression) } rather than making readers go look that up. Is that the same thing you're thinking, or did you have a different idea? regards, tom lane