@@ -68,17 +68,13 @@ static int numextmembers;
68
68
69
69
static void flagInhTables (TableInfo * tbinfo , int numTables ,
70
70
InhInfo * inhinfo , int numInherits );
71
- static void flagPartitions (TableInfo * tblinfo , int numTables ,
72
- PartInfo * partinfo , int numPartitions );
73
71
static void flagInhAttrs (DumpOptions * dopt , TableInfo * tblinfo , int numTables );
74
72
static DumpableObject * * buildIndexArray (void * objArray , int numObjs ,
75
73
Size objSize );
76
74
static int DOCatalogIdCompare (const void * p1 , const void * p2 );
77
75
static int ExtensionMemberIdCompare (const void * p1 , const void * p2 );
78
76
static void findParentsByOid (TableInfo * self ,
79
77
InhInfo * inhinfo , int numInherits );
80
- static void findPartitionParentByOid (TableInfo * self , PartInfo * partinfo ,
81
- int numPartitions );
82
78
static int strInArray (const char * pattern , char * * arr , int arr_size );
83
79
84
80
@@ -97,10 +93,8 @@ getSchemaData(Archive *fout, int *numTablesPtr)
97
93
NamespaceInfo * nspinfo ;
98
94
ExtensionInfo * extinfo ;
99
95
InhInfo * inhinfo ;
100
- PartInfo * partinfo ;
101
96
int numAggregates ;
102
97
int numInherits ;
103
- int numPartitions ;
104
98
int numRules ;
105
99
int numProcLangs ;
106
100
int numCasts ;
@@ -237,10 +231,6 @@ getSchemaData(Archive *fout, int *numTablesPtr)
237
231
write_msg (NULL , "reading table inheritance information\n" );
238
232
inhinfo = getInherits (fout , & numInherits );
239
233
240
- if (g_verbose )
241
- write_msg (NULL , "reading partition information\n" );
242
- partinfo = getPartitions (fout , & numPartitions );
243
-
244
234
if (g_verbose )
245
235
write_msg (NULL , "reading event triggers\n" );
246
236
getEventTriggers (fout , & numEventTriggers );
@@ -255,11 +245,6 @@ getSchemaData(Archive *fout, int *numTablesPtr)
255
245
write_msg (NULL , "finding inheritance relationships\n" );
256
246
flagInhTables (tblinfo , numTables , inhinfo , numInherits );
257
247
258
- /* Link tables to partition parents, mark parents as interesting */
259
- if (g_verbose )
260
- write_msg (NULL , "finding partition relationships\n" );
261
- flagPartitions (tblinfo , numTables , partinfo , numPartitions );
262
-
263
248
if (g_verbose )
264
249
write_msg (NULL , "reading column info for interesting tables\n" );
265
250
getTableAttrs (fout , tblinfo , numTables );
@@ -292,10 +277,6 @@ getSchemaData(Archive *fout, int *numTablesPtr)
292
277
write_msg (NULL , "reading policies\n" );
293
278
getPolicies (fout , tblinfo , numTables );
294
279
295
- if (g_verbose )
296
- write_msg (NULL , "reading partition key information for interesting tables\n" );
297
- getTablePartitionKeyInfo (fout , tblinfo , numTables );
298
-
299
280
if (g_verbose )
300
281
write_msg (NULL , "reading publications\n" );
301
282
getPublications (fout );
@@ -354,43 +335,6 @@ flagInhTables(TableInfo *tblinfo, int numTables,
354
335
}
355
336
}
356
337
357
- /* flagPartitions -
358
- * Fill in parent link fields of every target table that is partition,
359
- * and mark parents of partitions as interesting
360
- *
361
- * modifies tblinfo
362
- */
363
- static void
364
- flagPartitions (TableInfo * tblinfo , int numTables ,
365
- PartInfo * partinfo , int numPartitions )
366
- {
367
- int i ;
368
-
369
- for (i = 0 ; i < numTables ; i ++ )
370
- {
371
- /* Some kinds are never partitions */
372
- if (tblinfo [i ].relkind == RELKIND_SEQUENCE ||
373
- tblinfo [i ].relkind == RELKIND_VIEW ||
374
- tblinfo [i ].relkind == RELKIND_MATVIEW )
375
- continue ;
376
-
377
- /* Don't bother computing anything for non-target tables, either */
378
- if (!tblinfo [i ].dobj .dump )
379
- continue ;
380
-
381
- /* Find the parent TableInfo and save */
382
- findPartitionParentByOid (& tblinfo [i ], partinfo , numPartitions );
383
-
384
- /* Mark the parent as interesting for getTableAttrs */
385
- if (tblinfo [i ].partitionOf )
386
- {
387
- tblinfo [i ].partitionOf -> interesting = true;
388
- addObjectDependency (& tblinfo [i ].dobj ,
389
- tblinfo [i ].partitionOf -> dobj .dumpId );
390
- }
391
- }
392
- }
393
-
394
338
/* flagInhAttrs -
395
339
* for each dumpable table in tblinfo, flag its inherited attributes
396
340
*
@@ -991,40 +935,6 @@ findParentsByOid(TableInfo *self,
991
935
self -> parents = NULL ;
992
936
}
993
937
994
- /*
995
- * findPartitionParentByOid
996
- * find a partition's parent in tblinfo[]
997
- */
998
- static void
999
- findPartitionParentByOid (TableInfo * self , PartInfo * partinfo ,
1000
- int numPartitions )
1001
- {
1002
- Oid oid = self -> dobj .catId .oid ;
1003
- int i ;
1004
-
1005
- for (i = 0 ; i < numPartitions ; i ++ )
1006
- {
1007
- if (partinfo [i ].partrelid == oid )
1008
- {
1009
- TableInfo * parent ;
1010
-
1011
- parent = findTableByOid (partinfo [i ].partparent );
1012
- if (parent == NULL )
1013
- {
1014
- write_msg (NULL , "failed sanity check, parent OID %u of table \"%s\" (OID %u) not found\n" ,
1015
- partinfo [i ].partparent ,
1016
- self -> dobj .name ,
1017
- oid );
1018
- exit_nicely (1 );
1019
- }
1020
- self -> partitionOf = parent ;
1021
-
1022
- /* While we're at it, also save the partdef */
1023
- self -> partitiondef = partinfo [i ].partdef ;
1024
- }
1025
- }
1026
- }
1027
-
1028
938
/*
1029
939
* parseOidArray
1030
940
* parse a string of numbers delimited by spaces into a character array
0 commit comments