forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4d6603f
committed
Simplify psql \d's rule for ordering the indexes of a table.
The previous rule was "primary key (if any) first, then other uniqueindexes in name order, then all other indexes in name order".But the preference for unique indexes seems a bit obsolete since theintroduction of exclusion constraints. It's no longer the casethat unique indexes are the only ones that constrain what data canbe in the table, and it's hard to see what other rationale there isfor separating out unique indexes. Other new features like thepossibility for some indexes to be INVALID (hence, not constraininganything) make this even shakier.Hence, simplify the sort order to be "primary key (if any) first,then all other indexes in name order".No documentation change, since this was never documented anyway.A couple of existing regression test cases change output, though.Discussion:https://postgr.es/m/14422.1561474929@sss.pgh.pa.us1 parent66c5bd3 commit4d6603f
File tree
4 files changed
+16
-16
lines changed- src
- bin/psql
- test/regress/expected
4 files changed
+16
-16
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2312 | 2312 |
| |
2313 | 2313 |
| |
2314 | 2314 |
| |
2315 |
| - | |
| 2315 | + | |
2316 | 2316 |
| |
2317 | 2317 |
| |
2318 | 2318 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1925 | 1925 |
| |
1926 | 1926 |
| |
1927 | 1927 |
| |
1928 |
| - | |
1929 |
| - | |
1930 | 1928 |
| |
| 1929 | + | |
1931 | 1930 |
| |
1932 | 1931 |
| |
1933 | 1932 |
| |
| 1933 | + | |
1934 | 1934 |
| |
1935 | 1935 |
| |
1936 | 1936 |
| |
| |||
1950 | 1950 |
| |
1951 | 1951 |
| |
1952 | 1952 |
| |
1953 |
| - | |
1954 |
| - | |
1955 | 1953 |
| |
| 1954 | + | |
1956 | 1955 |
| |
1957 | 1956 |
| |
1958 | 1957 |
| |
| 1958 | + | |
1959 | 1959 |
| |
1960 | 1960 |
| |
1961 | 1961 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1374 | 1374 |
| |
1375 | 1375 |
| |
1376 | 1376 |
| |
1377 |
| - | |
1378 |
| - | |
1379 | 1377 |
| |
1380 | 1378 |
| |
| 1379 | + | |
| 1380 | + | |
1381 | 1381 |
| |
1382 | 1382 |
| |
1383 | 1383 |
| |
| |||
1390 | 1390 |
| |
1391 | 1391 |
| |
1392 | 1392 |
| |
1393 |
| - | |
1394 |
| - | |
1395 | 1393 |
| |
1396 | 1394 |
| |
| 1395 | + | |
| 1396 | + | |
1397 | 1397 |
| |
1398 | 1398 |
| |
1399 | 1399 |
| |
| |||
2115 | 2115 |
| |
2116 | 2116 |
| |
2117 | 2117 |
| |
2118 |
| - | |
2119 | 2118 |
| |
| 2119 | + | |
2120 | 2120 |
| |
2121 | 2121 |
| |
2122 | 2122 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
| 89 | + | |
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
91 | 93 |
| |
92 | 94 |
| |
93 |
| - | |
94 |
| - | |
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| 118 | + | |
| 119 | + | |
118 | 120 |
| |
119 | 121 |
| |
120 | 122 |
| |
121 | 123 |
| |
122 | 124 |
| |
123 |
| - | |
124 |
| - | |
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| |||
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
| 166 | + | |
| 167 | + | |
166 | 168 |
| |
167 | 169 |
| |
168 | 170 |
| |
169 | 171 |
| |
170 | 172 |
| |
171 |
| - | |
172 |
| - | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
|
0 commit comments
Comments
(0)