pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Bayer <mike_mp@zzzcomputing.com>
To: pgsql-bugs@lists.postgresql.org
Subject: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
Date: Thu, 12 Dec 2024 09:08:58 -0500
Message-ID: <a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com> (raw)

this occurs on postgresql 17.2 and did not occur on any previous version including 16, 15, 14.   apologies if this has already been reported but I didn't see any means of looking up existing issues

complete steps below

$ psql -U scott -h pg17 test
Password for user scott: 
psql (16.3, server 17.2)
WARNING: psql major version 16, server major version 17.
         Some psql features might not work.
Type "help" for help.

test=> CREATE DOMAIN not_nullable_domain AS TEXT NOT NULL;
CREATE DOMAIN
test=> SELECT 
    domain_constraints.condefs, domain_constraints.connames, pg_catalog.pg_collation.collname 
FROM pg_catalog.pg_type 
    JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_type.typnamespace 
    LEFT OUTER JOIN pg_catalog.pg_collation ON pg_catalog.pg_type.typcollation = pg_catalog.pg_collation.oid 
    LEFT OUTER JOIN 
        (SELECT pg_catalog.pg_constraint.contypid AS contypid, 
            array_agg(pg_catalog.pg_get_constraintdef(pg_catalog.pg_constraint.oid, true)) AS condefs, 
            array_agg(CAST(pg_catalog.pg_constraint.conname AS TEXT)) AS connames 
FROM pg_catalog.pg_constraint 
WHERE pg_catalog.pg_constraint.contypid != 0 
GROUP BY pg_catalog.pg_constraint.contypid) AS domain_constraints ON pg_catalog.pg_type.oid = domain_constraints.contypid 
WHERE pg_catalog.pg_type.typtype = 'd' ORDER BY pg_catalog.pg_namespace.nspname, pg_catalog.pg_type.typname;
ERROR:  invalid constraint type "n"







view thread (8+ messages)  latest in thread

Message-ID: <a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com>
Permalink:  ../a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com/
Also on:    postgresql.org/message-id/a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com

 · 

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: pgsql-bugs@postgresql.org
  Cc: mike_mp@zzzcomputing.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
  In-Reply-To: <a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com>

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

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