Re: BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3)
Date
Msg-id 2543615.1774896258@sss.pgh.pa.us
Whole thread Raw
In response to BUG #19444: conkey field empty for domain NOT NULL constraint in pg_constraint (18.3)  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #19438: segfault with temp_file_limit inside cursor
Next
From: Tom Lane
Date:
Subject: Re: BUG #19445: Domain DEFAULT not recorded in pg_attrdef (atthasdef false) in PostgreSQL 18.3