Re: [PATCH] REPLICA IDENTITY USING INDEX accepts column with invalid NOT NULL

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Ante Krešić <ante(at)tigerdata(dot)com>
Subject: Re: [PATCH] REPLICA IDENTITY USING INDEX accepts column with invalid NOT NULL
Date: 2026-06-12 05:21:16
Message-ID: aiuW4czjy5IKTXSS@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Jun-11, Masahiko Sawada wrote:

> It would be better to factor the into a common function that checks
> whether the column has a valid NOT NULL constraint, to remove the code
> duplication.

I agree, we should have a function like
bool
notNullConstraintValidated(Oid relid, AttrNumber attnum)
in pg_constraint.c, and use it in the various places where we only care
about the constraint validation status.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-06-12 05:25:27 Re: Support EXCEPT for ALL SEQUENCES publications
Previous Message solai v 2026-06-12 05:20:46 Re: Adding pg_dump flag for parallel export to pipes