| 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-15 16:50:54 |
| Message-ID: | ajAhnzvdtDX7V9WZ@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-Jun-12, Álvaro Herrera wrote:
> 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.
I take that back. I think this change would warrant merging this new
code with the existing verifyNotNullPKCompatible(), which wants to do
pretty much the same; but that's probably a larger refactoring that
should be done in pg20 only. So maybe we can just do the simple thing
(Ante's patch, mostly, I think) for this backpatchable bug fix, then
change things more fully later on.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-06-15 17:08:22 | Re: Fix unqualified catalog references in psql describe queries |
| Previous Message | Tom Lane | 2026-06-15 16:26:53 | Re: Modernizing pg_bsd_indent's error/warning reporting code |