invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 - Mailing list pgsql-bugs

From Mike Bayer
Subject invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
Date
Msg-id a90f53c4-56f3-4b07-aefc-49afdc67dba6@app.fastmail.com
Whole thread Raw
Responses Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
List pgsql-bugs
this occurs on postgresql 17.2 and did not occur on any previous version including 16, 15, 14.   apologies if this has
alreadybeen 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"





pgsql-bugs by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: "memory exhausted" in query parser/simplifier for many nested parentheses
Next
From: "David G. Johnston"
Date:
Subject: Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16