diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2018-05-03 18:37:34 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2018-05-03 18:37:34 +0300 |
commit | ac7a7e328f3e7eb89874860e554517c24dac9150 (patch) | |
tree | 9ae3fe9535c526c4502be112a6f1032bc5fdc5f9 /src | |
parent | a7a7387575b87a7ae551307a24835f549d530d14 (diff) | |
download | postgresql-ac7a7e328f3e7eb89874860e554517c24dac9150.tar.gz postgresql-ac7a7e328f3e7eb89874860e554517c24dac9150.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index c5b49459cc4..c4af22d902f 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -6786,7 +6786,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "i.indnkeyatts AS indnkeyatts, " "i.indnatts AS indnatts, " - "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "i.indisreplident, t.relpages, " "c.contype, c.conname, " @@ -6824,7 +6823,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "i.indnatts AS indnkeyatts, " "i.indnatts AS indnatts, " - "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "i.indisreplident, t.relpages, " "c.contype, c.conname, " @@ -6858,7 +6856,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "i.indnatts AS indnkeyatts, " "i.indnatts AS indnatts, " - "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " @@ -6888,7 +6885,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "i.indnatts AS indnkeyatts, " "i.indnatts AS indnatts, " - "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " @@ -6919,7 +6915,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "t.relname AS indexname, " "0 AS parentidx, " "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " - "t.relnatts AS indnkeys, " + "t.relnatts AS indnkeyatts, " + "t.relnatts AS indnatts, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " |