Fix not-null constraint test
Alvaro Herrera <alvherre@alvh.no-ip.org>
Fix not-null constraint test When a partitioned table has a primary key, trying to find the corresponding not-null constraint for that column would come up empty, causing code that's trying to check said not-null constraint to crash. Fix by only running the check when the not-null constraint exists. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/d57b4a69-7394-3146-5976-9a1ef27e7972@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +19 −7 |
| src/test/regress/expected/constraints.out | modified | +11 −0 |
| src/test/regress/sql/constraints.sql | modified | +11 −0 |
Discussion
- cataloguing NOT NULL constraints 163 messages · 2022-08-17 → 2024-05-16