@@ -76,23 +76,13 @@ typedef struct _catalogIdMapEntry
7676#include "lib/simplehash.h"
7777
7878#define CATALOGIDHASH_INITIAL_SIZE 10000
79- <<<<<<< HEAD
80-
81- static catalogid_hash * catalogIdHash = NULL ;
82- = == == ==
83- >>>>>>> REL_16_9
8479
8580static catalogid_hash * catalogIdHash = NULL ;
8681
8782static void flagInhTables (Archive * fout , TableInfo * tblinfo , int numTables ,
8883 InhInfo * inhinfo , int numInherits );
8984static void flagInhIndexes (Archive * fout , TableInfo * tblinfo , int numTables );
9085static void flagInhAttrs (DumpOptions * dopt , TableInfo * tblinfo , int numTables );
91- <<<<<<< HEAD
92- static void findParentsByOid (TableInfo * self ,
93- InhInfo * inhinfo , int numInherits );
94- = == == ==
95- >>>>>>> REL_16_9
9686static int strInArray (const char * pattern , char * * arr , int arr_size );
9787static IndxInfo * findIndexByOid (Oid oid );
9888
@@ -195,12 +185,9 @@ getSchemaData(Archive *fout, int *numTablesPtr)
195185
196186 pg_log_info ("reading user-defined operators" );
197187 (void ) getOperators (fout , & numOperators );
198- <<<<<<< HEAD
199188
200189 pg_log_info ("reading user-defined external protocols" );
201190 getExtProtocols (fout , & numExtProtocols );
202- = == == ==
203- >>>>>>> REL_16_9
204191
205192 pg_log_info ("reading user-defined access methods" );
206193 getAccessMethods (fout , & numAccessMethods );
@@ -380,46 +367,6 @@ flagInhTables(Archive *fout, TableInfo *tblinfo, int numTables,
380367 */
381368 for (i = 0 ; i < numTables ; i ++ )
382369 {
383- <<<<<<< HEAD
384- bool find_parents = true;
385- bool mark_parents = true;
386-
387- /* Some kinds never have parents */
388- if (tblinfo [i ].relkind == RELKIND_SEQUENCE ||
389- tblinfo [i ].relkind == RELKIND_VIEW ||
390- tblinfo [i ].relkind == RELKIND_MATVIEW )
391- continue ;
392-
393- /*
394- * FIXME: In PostgreSQL, foreign tables can be inherited. But
395- * pg_dump chokes on external tables, if an external table is
396- * used as a partition, and a column has attislocal=false.
397- */
398- if (tblinfo [i ].relstorage == 'x' /* RELSTORAGE_EXTERNAL */ )
399- continue ;
400-
401- /*
402- * Normally, we don't bother computing anything for non-target tables,
403- * but if load-via-partition-root is specified, we gather information
404- * on every partition in the system so that getRootTableInfo can trace
405- * from any given to leaf partition all the way up to the root. (We
406- * don't need to mark them as interesting for getTableAttrs, though.)
407- */
408- if (!tblinfo [i ].dobj .dump )
409- {
410- mark_parents = false;
411-
412- if (!dopt -> load_via_partition_root ||
413- !tblinfo [i ].ispartition )
414- find_parents = false;
415- }
416-
417- /* If needed, find all the immediate parent tables. */
418- if (find_parents )
419- findParentsByOid (& tblinfo [i ], inhinfo , numInherits );
420-
421- = == == ==
422- >>>>>>> REL_16_9
423370 /*
424371 * If needed, mark the parents as interesting for getTableAttrs and
425372 * getIndexes. We only need this for direct parents of dumpable
@@ -1110,59 +1057,6 @@ findOwningExtension(CatalogId catalogId)
11101057 return entry -> ext ;
11111058}
11121059
1113- <<<<<<< HEAD
1114-
1115- /*
1116- * findParentsByOid
1117- * find a table's parents in tblinfo[]
1118- */
1119- static void
1120- findParentsByOid (TableInfo * self ,
1121- InhInfo * inhinfo , int numInherits )
1122- {
1123- Oid oid = self -> dobj .catId .oid ;
1124- int i ,
1125- j ;
1126- int numParents ;
1127-
1128- numParents = 0 ;
1129- for (i = 0 ; i < numInherits ; i ++ )
1130- {
1131- if (inhinfo [i ].inhrelid == oid )
1132- numParents ++ ;
1133- }
1134-
1135- self -> numParents = numParents ;
1136-
1137- if (numParents > 0 )
1138- {
1139- self -> parents = (TableInfo * * )
1140- pg_malloc (sizeof (TableInfo * ) * numParents );
1141- j = 0 ;
1142- for (i = 0 ; i < numInherits ; i ++ )
1143- {
1144- if (inhinfo [i ].inhrelid == oid )
1145- {
1146- TableInfo * parent ;
1147-
1148- parent = findTableByOid (inhinfo [i ].inhparent );
1149- if (parent == NULL )
1150- {
1151- pg_log_error ("failed sanity check, parent OID %u of table \"%s\" (OID %u) not found" ,
1152- inhinfo [i ].inhparent ,
1153- self -> dobj .name ,
1154- oid );
1155- exit_nicely (1 );
1156- }
1157- self -> parents [j ++ ] = parent ;
1158- }
1159- }
1160- }
1161- else
1162- self -> parents = NULL ;
1163- }
1164- = == == ==
1165- >>>>>>> REL_16_9
11661060
11671061/*
11681062 * parseOidArray
0 commit comments