Обсуждение: pg_get_constraintdef throws SQL Error [XX000]: ERROR: invalid constraint type "n" (PG17)

Поиск
Список
Период
Сортировка

pg_get_constraintdef throws SQL Error [XX000]: ERROR: invalid constraint type "n" (PG17)

От
Pierre-Paul Hackens
Дата:
Dear support team,

I am writing to report a bug I encountered with the pg_get_constraintdef function:

CREATE DOMAIN not_null AS TEXT NOT NULL;


CREATE TABLE a (

col not_null

);


SELECT *, pg_get_constraintdef(oid)

FROM pg_constraint

WHERE contype = 'n';


SQL Error [XX000]: ERROR: invalid constraint type "n"


In PG 16 it was ok.
Thank you for your attention to this matter.

Sincerely,
Pierre-Paul



On 2025-Feb-06, Pierre-Paul Hackens wrote:

> Dear support team,
> 
> I am writing to report a bug I encountered with the pg_get_constraintdef
> function:

> SELECT *, pg_get_constraintdef(oid)
> FROM pg_constraint
> WHERE contype = 'n';
> 
> SQL Error [XX000]: ERROR: invalid constraint type "n"

Hello, thanks for reporting this.  It was reported previously and
already fixed; the fix will be in 17.3, to be released next week.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/