- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb8b1e87
committed
Fix PG 17 [NOT] NULL optimization bug for domains
A PG 17 optimization allowed columns with NOT NULL constraints to skiptable scans for IS NULL queries, and to skip IS NOT NULL checks for ISNOT NULL queries. This didn't work for domain types, since domain typesdon't follow the IS NULL/IS NOT NULL constraint logic. To fix, disablethis optimization for domains for PG 17+.Reported-by: Jan BehrensDiagnosed-by: Tom LaneDiscussion:https://postgr.es/m/Z37p0paENWWUarj-@momjian.usBackpatch-through: 171 parent5cbbe70 commitb8b1e87
File tree
2 files changed
+16
-1
lines changed- doc/src/sgml/ref
- src/backend/optimizer/plan
2 files changed
+16
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
283 | 283 |
| |
284 | 284 |
| |
285 | 285 |
| |
286 |
| - | |
| 286 | + | |
| 287 | + | |
287 | 288 |
| |
288 | 289 |
| |
289 | 290 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2758 | 2758 |
| |
2759 | 2759 |
| |
2760 | 2760 |
| |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
2761 | 2768 |
| |
2762 | 2769 |
| |
2763 | 2770 |
| |
| |||
2816 | 2823 |
| |
2817 | 2824 |
| |
2818 | 2825 |
| |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
2819 | 2833 |
| |
2820 | 2834 |
| |
2821 | 2835 |
| |
|
0 commit comments
Comments
(0)