- Notifications
You must be signed in to change notification settings - Fork28
Commit97d4445
committed
Save a few bytes by removing useless last argument to SearchCatCacheList.
There's never any value in giving a fully specified cache key toSearchCatCacheList: you might as well call SearchCatCache instead,since there could be only one match. So the maximum useful number ofkey arguments is one less than the supported number of key columns.We might as well remove the useless extra argument and save some fewbytes per call site, as well as a cycle or so per call.I believe the reason it was coded like this is that originally, callershad to write out all the dummy arguments in each call, and so it seemedless confusing if SearchCatCache and SearchCatCacheList took the samenumber of key arguments. But since commite26c539, callers only writetheir live arguments explicitly, making that a non-factor; and there'ssurely been enough time for third-party modules to adapt to that codingstyle. So this is only an ABI break not an API break for callers.Per discussion with Oliver Ford, this might also make it less confusinghow to use SearchCatCacheList correctly.Discussion:https://postgr.es/m/27788.1517069693@sss.pgh.pa.us1 parentfc96c69 commit97d4445
File tree
4 files changed
+14
-11
lines changed- src
- backend/utils/cache
- include/utils
4 files changed
+14
-11
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 | 1514 |
| |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1515 | 1520 |
| |
1516 | 1521 |
| |
1517 | 1522 |
| |
| |||
1520 | 1525 |
| |
1521 | 1526 |
| |
1522 | 1527 |
| |
1523 |
| - | |
1524 |
| - | |
| 1528 | + | |
1525 | 1529 |
| |
| 1530 | + | |
1526 | 1531 |
| |
1527 | 1532 |
| |
1528 | 1533 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1418 | 1418 |
| |
1419 | 1419 |
| |
1420 | 1420 |
| |
1421 |
| - | |
| 1421 | + | |
1422 | 1422 |
| |
1423 | 1423 |
| |
1424 | 1424 |
| |
1425 | 1425 |
| |
1426 | 1426 |
| |
1427 | 1427 |
| |
1428 |
| - | |
| 1428 | + | |
1429 | 1429 |
| |
1430 | 1430 |
| |
1431 | 1431 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
| 217 | + | |
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
|
Lines changed: 4 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
160 |
| - | |
| 160 | + | |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
| 210 | + | |
211 | 211 |
| |
212 |
| - | |
| 212 | + | |
213 | 213 |
| |
214 |
| - | |
215 |
| - | |
216 |
| - | |
| 214 | + | |
217 | 215 |
| |
218 | 216 |
| |
219 | 217 |
| |
|
0 commit comments
Comments
(0)