@@ -5461,7 +5461,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5461
5461
* is not.
5462
5462
*/
5463
5463
resetPQExpBuffer (query );
5464
- if (fout -> remoteVersion >= 90502 )
5464
+
5465
+ if (fout -> remoteVersion >= 90502 && fout -> isPgpro )
5465
5466
{
5466
5467
/*
5467
5468
* In PGPRO_9.5.2 we add INCLUDING columns functionality
@@ -5506,8 +5507,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5506
5507
"SELECT t.tableoid, t.oid, "
5507
5508
"t.relname AS indexname, "
5508
5509
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
5509
- "NULL AS indnkeyatts, "
5510
- "NULL AS indnatts, "
5510
+ "t.relnatts AS indnkeyatts, "
5511
+ "t.relnatts AS indnatts, "
5511
5512
"t.relnatts AS indnkeys, "
5512
5513
"i.indkey, i.indisclustered, "
5513
5514
"i.indisreplident, t.relpages, "
@@ -5539,8 +5540,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5539
5540
"SELECT t.tableoid, t.oid, "
5540
5541
"t.relname AS indexname, "
5541
5542
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
5542
- "NULL AS indnkeyatts, "
5543
- "NULL AS indnatts, "
5543
+ "t.relnatts AS indnkeyatts, "
5544
+ "t.relnatts AS indnatts, "
5544
5545
"t.relnatts AS indnkeys, "
5545
5546
"i.indkey, i.indisclustered, "
5546
5547
"false AS indisreplident, t.relpages, "
@@ -5568,8 +5569,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5568
5569
"SELECT t.tableoid, t.oid, "
5569
5570
"t.relname AS indexname, "
5570
5571
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
5571
- "NULL AS indnkeyatts, "
5572
- "NULL AS indnatts, "
5572
+ "t.relnatts AS indnkeyatts, "
5573
+ "t.relnatts AS indnatts, "
5573
5574
"t.relnatts AS indnkeys, "
5574
5575
"i.indkey, i.indisclustered, "
5575
5576
"false AS indisreplident, t.relpages, "
@@ -5600,8 +5601,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5600
5601
"SELECT t.tableoid, t.oid, "
5601
5602
"t.relname AS indexname, "
5602
5603
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
5603
- "NULL AS indnkeyatts, "
5604
- "NULL AS indnatts, "
5604
+ "t.relnatts AS indnkeyatts, "
5605
+ "t.relnatts AS indnatts, "
5605
5606
"t.relnatts AS indnkeys, "
5606
5607
"i.indkey, i.indisclustered, "
5607
5608
"false AS indisreplident, t.relpages, "
@@ -5631,8 +5632,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5631
5632
"SELECT t.tableoid, t.oid, "
5632
5633
"t.relname AS indexname, "
5633
5634
"pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, "
5634
- "NULL AS indnkeyatts, "
5635
- "NULL AS indnatts, "
5635
+ "t.relnatts AS indnkeyatts, "
5636
+ "t.relnatts AS indnatts, "
5636
5637
"t.relnatts AS indnkeys, "
5637
5638
"i.indkey, i.indisclustered, "
5638
5639
"false AS indisreplident, t.relpages, "
@@ -5662,8 +5663,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5662
5663
"SELECT t.tableoid, t.oid, "
5663
5664
"t.relname AS indexname, "
5664
5665
"pg_get_indexdef(i.indexrelid) AS indexdef, "
5665
- "NULL AS indnkeyatts, "
5666
- "NULL AS indnatts, "
5666
+ "t.relnatts AS indnkeyatts, "
5667
+ "t.relnatts AS indnatts, "
5667
5668
"t.relnatts AS indnkeys, "
5668
5669
"i.indkey, false AS indisclustered, "
5669
5670
"false AS indisreplident, t.relpages, "
@@ -5691,8 +5692,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
5691
5692
"t.oid, "
5692
5693
"t.relname AS indexname, "
5693
5694
"pg_get_indexdef(i.indexrelid) AS indexdef, "
5694
- "NULL AS indnkeyatts, "
5695
- "NULL AS indnatts, "
5695
+ "t.relnatts AS indnkeyatts, "
5696
+ "t.relnatts AS indnatts, "
5696
5697
"t.relnatts AS indnkeys, "
5697
5698
"i.indkey, false AS indisclustered, "
5698
5699
"false AS indisreplident, t.relpages, "
0 commit comments