public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dominique Devienne <[email protected]>
To: [email protected]
Subject: pg_constraint catalog changes in v18 beta1???
Date: Wed, 4 Jun 2025 15:07:43 +0200
Message-ID: <CAFCRh--+c38Qfp_i4SOt65PKuKcZLZAtS+1P=6BjMAnoNHisGw@mail.gmail.com> (raw)

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






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: pg_constraint catalog changes in v18 beta1???
  In-Reply-To: <CAFCRh--+c38Qfp_i4SOt65PKuKcZLZAtS+1P=6BjMAnoNHisGw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox