|
|
|
|
@ -5736,7 +5736,7 @@ getPartitions(Archive *fout, int *numPartitions) |
|
|
|
|
PGresult *res; |
|
|
|
|
int ntups; |
|
|
|
|
int i; |
|
|
|
|
PQExpBuffer query = createPQExpBuffer(); |
|
|
|
|
PQExpBuffer query; |
|
|
|
|
PartInfo *partinfo; |
|
|
|
|
|
|
|
|
|
int i_partrelid; |
|
|
|
|
@ -5750,6 +5750,8 @@ getPartitions(Archive *fout, int *numPartitions) |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
query = createPQExpBuffer(); |
|
|
|
|
|
|
|
|
|
/* Make sure we are in proper schema */ |
|
|
|
|
selectSourceSchema(fout, "pg_catalog"); |
|
|
|
|
|
|
|
|
|
@ -7067,7 +7069,7 @@ getTransforms(Archive *fout, int *numTransforms) |
|
|
|
|
void |
|
|
|
|
getTablePartitionKeyInfo(Archive *fout, TableInfo *tblinfo, int numTables) |
|
|
|
|
{ |
|
|
|
|
PQExpBuffer q = createPQExpBuffer(); |
|
|
|
|
PQExpBuffer q; |
|
|
|
|
int i; |
|
|
|
|
PGresult *res; |
|
|
|
|
|
|
|
|
|
@ -7075,6 +7077,8 @@ getTablePartitionKeyInfo(Archive *fout, TableInfo *tblinfo, int numTables) |
|
|
|
|
if (fout->remoteVersion < 100000) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
q = createPQExpBuffer(); |
|
|
|
|
|
|
|
|
|
for (i = 0; i < numTables; i++) |
|
|
|
|
{ |
|
|
|
|
TableInfo *tbinfo = &(tblinfo[i]); |
|
|
|
|
@ -7094,6 +7098,8 @@ getTablePartitionKeyInfo(Archive *fout, TableInfo *tblinfo, int numTables) |
|
|
|
|
Assert(PQntuples(res) == 1); |
|
|
|
|
tbinfo->partkeydef = pg_strdup(PQgetvalue(res, 0, 0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
destroyPQExpBuffer(q); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|