forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit13d53aa
committed
Doc/improve confusing, inefficient tests to locate CTID variable.
The IsCTIDVar() tests in nodeTidscan.c and nodeTidrangescan.clook buggy at first sight: they aren't checking that the varnomatches the table to be scanned. Actually they're safe becauseany Var in a scan-level qual must be for the correct table ...but if we're depending on that, it's pretty pointless to verifyvarlevelsup. (Besides which, varlevelsup is *always* zero atexecution, since we've flattened the rangetable long since.)Remove the useless varlevelsup check, and instead add somecommentary explaining why we don't need to check varno.Noted while fooling with a planner change that causes the orderof "t1.ctid = t2.ctid" to change in some tidscan.sql tests;I was briefly fooled into thinking there was a live bug here.1 parent0e972f5 commit13d53aa
2 files changed
+14
-4
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 |
| |
29 | 35 |
| |
30 | 36 |
| |
31 |
| - | |
32 |
| - | |
| 37 | + | |
33 | 38 |
| |
34 | 39 |
| |
35 | 40 |
| |
|
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 |
| |
39 | 45 |
| |
40 | 46 |
| |
41 |
| - | |
42 |
| - | |
| 47 | + | |
43 | 48 |
| |
44 | 49 |
| |
45 | 50 |
| |
|
0 commit comments
Comments
(0)