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 1t6vrM-00GVGl-EJ for pgsql-docs@arkaria.postgresql.org; Fri, 01 Nov 2024 17:54:56 +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 1t6vrK-00FwId-CB for pgsql-docs@arkaria.postgresql.org; Fri, 01 Nov 2024 17:54:54 +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 1t6vrK-00FwIU-4N for pgsql-docs@lists.postgresql.org; Fri, 01 Nov 2024 17:54:54 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6vrH-004DtD-Te for pgsql-docs@lists.postgresql.org; Fri, 01 Nov 2024 17:54:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=8nVw8FHQ0qaxokkcLR++vn2LSd26OSr+ZFaLrpMMliw=; b=MnKB2 YfwIRWpeFriFQTlPJAw0sbenZOIhXT1voDK8v/jSInADNmehOYVhp2tdzPlilPdYauV9qVm+Ulox4 RxBlb3nj2QF0FVs3aBYnG7W57omKSIbYag127694zG1mO3U1MhNoL/iYTqT1DpOmDHh/s4VVehfEL erA0Vk3qQw59BpoQwb41+bFskEgTHRX+1ch1DEWyeGkDQTaUGQ1hECabqc/SDrGyaoDlJum+b8KQC VDTNkbD6VJe34/lQ4xCq91IIwqCnb3ABh6vbg4kg//JIp5nfIo8nKNQjDfl0+rr0aLyCMQX8htqwQ ijn1nsAjujrzevpsO/Hdzs0IT5aOw==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1t6vrE-009Jrf-2D; Fri, 01 Nov 2024 13:54:48 -0400 Date: Fri, 1 Nov 2024 13:54:48 -0400 From: Bruce Momjian To: Tom Lane Cc: "David G. Johnston" , "elionescu@yahoo.com" , "pgsql-docs@lists.postgresql.org" Subject: Re: incorrect (incomplete) description for "alter domain" Message-ID: References: <172225092461.915373.6103973717483380183@wrigleys.postgresql.org> <2585954.1722265086@sss.pgh.pa.us> <2596729.1722266261@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Oct 16, 2024 at 05:11:54PM -0400, Bruce Momjian wrote: > > Actually, there *is* a bug in the description, because experimentation > > shows that CREATE DOMAIN accepts NULL in this syntax (as advertised) > > but ALTER DOMAIN does not. We could alternatively decide that that's > > a code bug and make ALTER DOMAIN take it, but I don't think it's worth > > any effort (and this behavior may actually have been intentional, too). > > I think we should just add > > > > where domain_constraint is: > > > > [ CONSTRAINT constraint_name ] > > { NOT NULL | CHECK (expression) } > > > > to the ALTER DOMAIN page, and then remove the claim that it's > > identical to CREATE DOMAIN. > > I have written the attached patch to document this. I assume this > should be backpatched to PG 12. Patch applied back to PG 12. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?"