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.96) (envelope-from ) id 1w7HcC-00594d-1r for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Mar 2026 18:45:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7HbB-005b43-2W for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Mar 2026 18:44:30 +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.96) (envelope-from ) id 1w7HbB-005b3v-1k for pgsql-bugs@lists.postgresql.org; Mon, 30 Mar 2026 18:44:29 +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.98.2) (envelope-from ) id 1w7Hb9-000000022iI-1W1q for pgsql-bugs@lists.postgresql.org; Mon, 30 Mar 2026 18:44:29 +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 62UIiIYj2543616; Mon, 30 Mar 2026 14:44:19 -0400 From: Tom Lane To: zheng_xianghang@163.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3) In-reply-to: <19444-21f73da373fc0f58@postgresql.org> References: <19444-21f73da373fc0f58@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 30 Mar 2026 03:10:45 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2543614.1774896258.1@sss.pgh.pa.us> Date: Mon, 30 Mar 2026 14:44:18 -0400 Message-ID: <2543615.1774896258@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > When creating a domain with a NOT NULL constraint, the conkey field in > pg_constraint remains empty. This is inconsistent with table-level NOT > NULL constraints, which correctly populate the conkey field. I do not think this is a bug. The system catalog documentation says conkey int2[] (references pg_attribute.attnum) If a table constraint (including foreign keys, but not constraint triggers), list of the constrained columns So (a) this is not a table constraint, and (b) a domain does not have columns. regards, tom lane