diff options
| author | Álvaro Herrera <alvherre@kurilemu.de> | 2025-10-29 11:41:39 +0100 |
|---|---|---|
| committer | Álvaro Herrera <alvherre@kurilemu.de> | 2025-10-29 11:41:39 +0100 |
| commit | 94f95d91b025cb6752b4118bb0b30851e3d64df9 (patch) | |
| tree | 3615c5c6faffab831d0a3d543dc487527cf514c2 /src/backend/parser/parser.c | |
| parent | a13833c35f9e07fe978bf6fad984d6f5f25f59cd (diff) | |
CheckNNConstraintFetch: Fill all of ConstrCheck in a single pass
Previously, we'd fill all fields except ccbin, and only later obtain and
detoast ccbin, with hypothetical failures being possible. If ccbin is
null (rare catalog corruption I have never witnessed) or its a corrupted
toast entry, we leak a tiny bit of memory in CacheMemoryContext from
having strdup'd the constraint name. Repair these by only attempting to
fill the struct once ccbin has been detoasted.
Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQAr=i3_Z4GvmediX900+sSySTeMkvuytYShhQqEwoGyvhA@mail.gmail.com
Diffstat (limited to 'src/backend/parser/parser.c')
0 files changed, 0 insertions, 0 deletions
