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 1r6Ciu-00HaTO-6T for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Nov 2023 16:38:40 +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 1r6Cis-002A65-OW for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Nov 2023 16:38:38 +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 1r6Cis-002A5v-EP for pgsql-hackers@lists.postgresql.org; Thu, 23 Nov 2023 16:38:38 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6Cip-00849e-Bk for pgsql-hackers@postgresql.org; Thu, 23 Nov 2023 16:38:37 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4266A3200AB7; Thu, 23 Nov 2023 11:38:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Nov 2023 11:38:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700757512; x= 1700843912; bh=f0pywOK4jB9cgzOP56wQvRiPwYe3xkJKMn7Bt2rJpw0=; b=o RZUCszSTkd5Ecmi9jbVs/Te13cl5lBQAPta9RUh+SbsVDdf1dpl3QX+S+dRVE7kr J0EknXEGlDqIHrluSvBLn3zvMak8Z9xTeesTc2Kp2uwXz26Z7/hdD5nTeRYPI/Pb oS4U+rcHqmgdwmGPHRLgoiVg3yo8stPjqaurJUIDG4LfdIdBWmV1I0/DqN0gqIIg Umsn+HK+HK8PgxQVDtgNUDAQPPlq+f26h5qc4xQ/3SK8z5hNym5cbh/Z59R5sZ9+ LOcacxEyMwjWTtIJ2jJdewf+v4mgb/++ZE2ULBY8M0oKRucSrop4Md9KRJPxd1UP FR7ISpJhCW0dtmnke1UsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 11:38:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1700757510; bh=J9/JaH+Lz8pqRWPYdaNOOMjIvaR6+VgiMg2KxgzyW4E=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Sp1ESiQVZsr2v6ugQF09UZppvRTx+A9tcKoxnhEAmeHLzjnt2Y+KgQGsMqIt4PFU/ YqiQo+B6jIQnQW88WhE2degxnopHV1IpjT9aCLLICaYq8HlNciURPxuZJnQYntECN8 Jxxrq3NgJgpm9pJhztluGNyFSZmonLPwRi40lIOAGWrtQbrmg2JwNn+zd3I24gFXrL H6GKrVhJDxM9eqCBQoH0JykMW9gGwe9aJJgxoCZeM9+B9T5/ycGNkyYu+FLLMzcQiP ft82YGt0aKv5CDaa6Pf/kdzfsn8kxyXOOgQh45U3hnEYsETMSBj0bxOiaiw5NAatxt 8+cq0/0BvhI5g== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 13C85DB; Thu, 23 Nov 2023 17:38:30 +0100 (CET) Date: Thu, 23 Nov 2023 17:38:30 +0100 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: Catalog domain not-null constraints Message-ID: <202311231638.httd7tqo45ux@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ec24d7b-633d-463a-84c6-7acff769c9e8@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Nov-23, Peter Eisentraut wrote: > This patch set applies the explicit catalog representation of not-null > constraints introduced by b0e96f3119 for table constraints also to domain > not-null constraints. I like the idea of having domain not-null constraints appear in pg_constraint. > Since there is no inheritance or primary keys etc., this is much simpler and > just applies the existing infrastructure to domains as well. If you create a table with column of domain that has a NOT NULL constraint, what happens? I mean, is the table column marked attnotnull, and how does it behave? Is there a separate pg_constraint row for the constraint in the table? What happens if you do ALTER TABLE ... DROP NOT NULL for that column? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Por suerte hoy explotó el califont porque si no me habría muerto de aburrido" (Papelucho)