Skip to content

Commit ac7a7e3

Browse files
committed
Fix pg_dump support for pre-8.2 versions
Unify indnkeys/indnatts/indnkeyatts usage for all version of query to get index information, remove indnkeys column from query as unused. Author: Marina Polyakova Noticed by: Peter Eisentraut
1 parent a7a7387 commit ac7a7e3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6786,7 +6786,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
67866786
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
67876787
"i.indnkeyatts AS indnkeyatts, "
67886788
"i.indnatts AS indnatts, "
6789-
"t.relnatts AS indnkeys, "
67906789
"i.indkey, i.indisclustered, "
67916790
"i.indisreplident, t.relpages, "
67926791
"c.contype, c.conname, "
@@ -6824,7 +6823,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
68246823
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
68256824
"i.indnatts AS indnkeyatts, "
68266825
"i.indnatts AS indnatts, "
6827-
"t.relnatts AS indnkeys, "
68286826
"i.indkey, i.indisclustered, "
68296827
"i.indisreplident, t.relpages, "
68306828
"c.contype, c.conname, "
@@ -6858,7 +6856,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
68586856
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
68596857
"i.indnatts AS indnkeyatts, "
68606858
"i.indnatts AS indnatts, "
6861-
"t.relnatts AS indnkeys, "
68626859
"i.indkey, i.indisclustered, "
68636860
"false AS indisreplident, t.relpages, "
68646861
"c.contype, c.conname, "
@@ -6888,7 +6885,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
68886885
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
68896886
"i.indnatts AS indnkeyatts, "
68906887
"i.indnatts AS indnatts, "
6891-
"t.relnatts AS indnkeys, "
68926888
"i.indkey, i.indisclustered, "
68936889
"false AS indisreplident, t.relpages, "
68946890
"c.contype, c.conname, "
@@ -6919,7 +6915,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
69196915
"t.relname AS indexname, "
69206916
"0 AS parentidx, "
69216917
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
6922-
"t.relnatts AS indnkeys, "
6918+
"t.relnatts AS indnkeyatts, "
6919+
"t.relnatts AS indnatts, "
69236920
"i.indkey, i.indisclustered, "
69246921
"false AS indisreplident, t.relpages, "
69256922
"c.contype, c.conname, "

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy