Re: BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zheng_xianghang(at)163(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3)
Date: 2026-03-30 18:44:18
Message-ID: 2543615.1774896258@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-03-30 18:49:30 Re: BUG #19445: Domain DEFAULT not recorded in pg_attrdef (atthasdef false) in PostgreSQL 18.3
Previous Message Tom Lane 2026-03-30 16:29:20 Re: BUG #19438: segfault with temp_file_limit inside cursor