You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3541,7 +3561,9 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3541
3561
" pg_catalog.array_to_string(ARRAY(SELECT pg_catalog.quote_ident(rolname) from pg_catalog.pg_roles WHERE oid = ANY(pol.polroles)), ', ') END AS polroles, "
3542
3562
"pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, "
3543
3563
"pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck "
3544
-
"FROM pg_catalog.pg_policy pol");
3564
+
"FROM unnest('%s'::pg_catalog.oid[]) AS src(tbloid)\n"
3565
+
"JOIN pg_catalog.pg_policy pol ON (src.tbloid = pol.polrelid)",
3566
+
tbloids->data);
3545
3567
3546
3568
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
3547
3569
@@ -3565,13 +3587,6 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3565
3587
Oid polrelid = atooid(PQgetvalue(res, j, i_polrelid));
3566
3588
TableInfo *tbinfo = findTableByOid(polrelid);
3567
3589
3568
-
/*
3569
-
* Ignore row security on tables not to be dumped. (This will
3570
-
* result in some harmless wasted slots in polinfo[].)
3571
-
*/
3572
-
if (!(tbinfo->dobj.dump & DUMP_COMPONENT_POLICY))
3573
-
continue;
3574
-
3575
3590
polinfo[j].dobj.objType = DO_POLICY;
3576
3591
polinfo[j].dobj.catId.tableoid =
3577
3592
atooid(PQgetvalue(res, j, i_tableoid));
@@ -3606,6 +3621,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
0 commit comments