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
@@ -3547,7 +3567,9 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3547
3567
" 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, "
3548
3568
"pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, "
3549
3569
"pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck "
3550
-
"FROM pg_catalog.pg_policy pol");
3570
+
"FROM unnest('%s'::pg_catalog.oid[]) AS src(tbloid)\n"
3571
+
"JOIN pg_catalog.pg_policy pol ON (src.tbloid = pol.polrelid)",
3572
+
tbloids->data);
3551
3573
3552
3574
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
3553
3575
@@ -3571,13 +3593,6 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3571
3593
Oid polrelid = atooid(PQgetvalue(res, j, i_polrelid));
3572
3594
TableInfo *tbinfo = findTableByOid(polrelid);
3573
3595
3574
-
/*
3575
-
* Ignore row security on tables not to be dumped. (This will
3576
-
* result in some harmless wasted slots in polinfo[].)
3577
-
*/
3578
-
if (!(tbinfo->dobj.dump & DUMP_COMPONENT_POLICY))
3579
-
continue;
3580
-
3581
3596
tbinfo->dobj.components |= DUMP_COMPONENT_POLICY;
3582
3597
3583
3598
polinfo[j].dobj.objType = DO_POLICY;
@@ -3614,6 +3629,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
0 commit comments