Re: Postgres 17 domains with NOT NULL and pg_get_constraintdef()

From: shammat(at)gmx(dot)net
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres 17 domains with NOT NULL and pg_get_constraintdef()
Date: 2025-01-08 18:39:25
Message-ID: 46650e9e-beb3-46ad-a26a-b356d6476cd2@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 08.01.25 um 14:10 schrieb Alvaro Herrera:
>> However, because the domain is defined with NOT NULL, this fails with
>>
>>> ERROR: invalid constraint type "n"
>>
>> with 17.2 on Windows and Linux.
>>
>> This is a result of storing the NOT NULL constraint in pg_constraint
>> and can easily be avoided by either using contype <> 'n' or by not calling
>> pg_get_constraintdef if contype = 'n'
>
> Yeah, thanks for the report -- this is clearly a bug and it was fixed
> already in the 17 branch, but it's not been released yet. It'll be in
> the February release.

Thanks for the confirmation.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-01-08 19:00:00 INTERVAL MINUTE TO SECOND didn't do what I thought it would do
Previous Message Tom Lane 2025-01-08 17:01:36 Re: Unexpected results from a query with UNION ALL