Function pg_get_constraintdef

Erki Eessaar <erki.eessaar@taltech.ee>

From: Erki Eessaar <erki.eessaar@taltech.ee>
To: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-11-21T11:46:45Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix pg_get_constraintdef for NOT NULL constraints on domains

Hello

SELECT pg_get_constraintdef(c.oid)
FROM pg_catalog.pg_constraint c;

If I execute the query in two different servers with PostgreSQL 17.1 and in different databases in these servers, then I get the answer

ERROR:  invalid constraint type "n"

In case of an empty database I do not get the error. The query worked in the servers before upgrading to PostgreSQL 17.

If I execute the query in a database of a server with PostgreSQL 15, then I do not get the error.

Best regards
Erki Eessaar