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 1qdY0G-003rBW-3S for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2023 15:30:08 +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 1qdY0E-0032mu-T5 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2023 15:30:06 +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 1qdY0E-0032ZY-C8 for pgsql-hackers@lists.postgresql.org; Tue, 05 Sep 2023 15:30:06 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdY0A-002tRj-L0 for pgsql-hackers@lists.postgresql.org; Tue, 05 Sep 2023 15:30:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9BC90320091F; Tue, 5 Sep 2023 11:30:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 05 Sep 2023 11:30:00 -0400 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=1693927800; x= 1694014200; bh=OgAEz1KXmMVaCiZALrwoWEsigl9MCPnIQ3Wm16s4QlU=; b=n DS8H1owGVyFiu5SWm15ORhYDJWQ7Fqb63dxAQ21+fOeao51xrZMJvQi3k0SyN89k HUwe6K6B98jaZXw6wglVYMamGcxplcVM/v4BIgkNCCiXurFAeTpv6VjtDdjRR7pV nJw1khqXf1JKYeaJTq+U0wEDaV0+L4tqfLC5cdrKQ6wGk+BrhlMOWH5LzWl7cggJ 8RKVNOOCpK9SYzbdRGSrjpNRi/jWkD6isF3Q2hMJa2Ke2iUdKgrM0RHe1O+yCfZg Gqp4t10ZkH/llVwRy6TFnPOs6ADPAwmNI534To4HQuca0RXaa4TOHiSGgJ8IAZa9 T1HXYYCcEwTmPH4sQJtCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehuddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepueeigfffueektdfgteeuuefgtedvueehgfehleefheel jeelfeffjedttdekvdejnecuffhomhgrihhnpehpohhsthhgrhdrvghspdgvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Sep 2023 11:29:59 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F061D426; Tue, 5 Sep 2023 17:29:56 +0200 (CEST) Date: Tue, 5 Sep 2023 17:29:56 +0200 From: Alvaro Herrera To: Peter Eisentraut Cc: Pg Hackers Subject: Re: cataloguing NOT NULL constraints Message-ID: <202309051529.cbo3eo44kdjh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <471cd41b-c345-3bee-fe97-061f74eba5b8@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Sep-05, Peter Eisentraut wrote: > The following information schema views are affected by the not-null > constraint catalog entries: > > 1. CHECK_CONSTRAINTS > 2. CONSTRAINT_COLUMN_USAGE > 3. DOMAIN_CONSTRAINTS > 4. TABLE_CONSTRAINTS > > Note that 1 and 3 also contain domain constraints. So as long as the domain > not-null constraints are not similarly catalogued, we can't delete the > separate not-null union branch. (3 never had one, so arguably a bit buggy.) > > I think we can fix up 4 by just deleting the not-null union branch. > > For 2, the simple fix is also easy, but there are some other options, as you > discuss above. > > How do you want to proceed? I posted as a patch in a separate thread[1]. Let me fix up the definitions for views 1 and 3 for domains per your comments, and I'll post in that thread again. [1] https://postgr.es/m/202309041710.psytrxlsiqex@alvherre.pgsql -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)