pg_constraint catalog changes in v18 beta1???

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_constraint catalog changes in v18 beta1???
Date: 2025-06-04 13:07:43
Message-ID: CAFCRh--+c38Qfp_i4SOt65PKuKcZLZAtS+1P=6BjMAnoNHisGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. I decided to test our stuff against the v18 beta1.

And right off the bat, I'm getting differences when introspecting a
schema via the catalogs, which now return NOT NULL constraints for
regular columns, which was not the case before, and when the doc seems
to say pg_constraint.contype = n is for domains only, while on our
test, the schema contains only the table as below, and no DOMAIN
types.

CREATE TABLE test_table (id numeric NOT NULL, name varchar(256))

Is this change of behavior normal?

This breaks our code, which is of course fixable, but this is old code
that hasn't changed since at least v14, thus I'm surprised. Was this
intentional?

Thanks, --DD

PS: Interestingly, our code also has this comment, which seems related:

// We used information_schema.table_constraints in the past ,
// but that view also presents system-generated not null constraints.
// Using pg_catalog.pg_constraint gets rid of the problem

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2025-06-04 13:43:30 Re: pg_constraint catalog changes in v18 beta1???
Previous Message Dominique Devienne 2025-06-04 12:23:17 LOCALE C.UTF-8 on EDB Windows v17 server