- Notifications
You must be signed in to change notification settings - Fork28
Commit028e3da
committed
Fix pg_get_indexdef()'s behavior for included index columns.
The multi-argument form of pg_get_indexdef() failed to print anything whenasked to print a single index column that is an included column rather thana key column. This seems an unintentional result of someone having triedto take a short-cut and use the attrsOnly flag for two different purposes.To fix, split said flag into two flags, attrsOnly which suppressesnon-attribute info, and keysOnly which suppresses included columns.Add a test case using psql's \d command, which relies on that function.(It's mighty tempting at this point to replace pg_get_indexdef_worker'smess of boolean flag arguments with a single bitmask-of-flags argument,which would allow making the call sites much more self-documenting.But I refrained for the moment.)Discussion:https://postgr.es/m/21724.1531943735@sss.pgh.pa.us1 parent1573995 commit028e3da
File tree
3 files changed
+38
-18
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+38
-18
lines changedLines changed: 27 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
320 | 320 |
| |
321 | 321 |
| |
322 | 322 |
| |
323 |
| - | |
| 323 | + | |
| 324 | + | |
324 | 325 |
| |
325 | 326 |
| |
326 | 327 |
| |
| |||
1097 | 1098 |
| |
1098 | 1099 |
| |
1099 | 1100 |
| |
1100 |
| - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1101 | 1104 |
| |
1102 | 1105 |
| |
1103 | 1106 |
| |
| |||
1117 | 1120 |
| |
1118 | 1121 |
| |
1119 | 1122 |
| |
1120 |
| - | |
1121 |
| - | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1122 | 1127 |
| |
1123 | 1128 |
| |
1124 | 1129 |
| |
| |||
1134 | 1139 |
| |
1135 | 1140 |
| |
1136 | 1141 |
| |
1137 |
| - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1138 | 1146 |
| |
1139 | 1147 |
| |
1140 |
| - | |
| 1148 | + | |
1141 | 1149 |
| |
1142 | 1150 |
| |
1143 | 1151 |
| |
1144 | 1152 |
| |
1145 | 1153 |
| |
1146 | 1154 |
| |
1147 | 1155 |
| |
1148 |
| - | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1149 | 1159 |
| |
1150 | 1160 |
| |
1151 | 1161 |
| |
| |||
1158 | 1168 |
| |
1159 | 1169 |
| |
1160 | 1170 |
| |
1161 |
| - | |
| 1171 | + | |
| 1172 | + | |
1162 | 1173 |
| |
1163 | 1174 |
| |
1164 | 1175 |
| |
| |||
1297 | 1308 |
| |
1298 | 1309 |
| |
1299 | 1310 |
| |
1300 |
| - | |
1301 |
| - | |
1302 |
| - | |
| 1311 | + | |
1303 | 1312 |
| |
1304 |
| - | |
| 1313 | + | |
1305 | 1314 |
| |
1306 | 1315 |
| |
1307 |
| - | |
1308 |
| - | |
| 1316 | + | |
| 1317 | + | |
1309 | 1318 |
| |
1310 | 1319 |
| |
1311 | 1320 |
| |
| |||
1352 | 1361 |
| |
1353 | 1362 |
| |
1354 | 1363 |
| |
1355 |
| - | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1356 | 1367 |
| |
1357 | 1368 |
| |
1358 | 1369 |
| |
1359 |
| - | |
1360 |
| - | |
1361 |
| - | |
1362 | 1370 |
| |
1363 | 1371 |
| |
1364 | 1372 |
| |
| |||
2197 | 2205 |
| |
2198 | 2206 |
| |
2199 | 2207 |
| |
| 2208 | + | |
2200 | 2209 |
| |
2201 | 2210 |
| |
2202 | 2211 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 |
| |
23 | 33 |
| |
24 | 34 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
|
0 commit comments
Comments
(0)