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
@@ -3621,7 +3641,9 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3621
3641
" 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, "
3622
3642
"pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, "
3623
3643
"pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck "
3624
-
"FROM pg_catalog.pg_policy pol");
3644
+
"FROM unnest('%s'::pg_catalog.oid[]) AS src(tbloid)\n"
3645
+
"JOIN pg_catalog.pg_policy pol ON (src.tbloid = pol.polrelid)",
3646
+
tbloids->data);
3625
3647
3626
3648
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
3627
3649
@@ -3645,13 +3667,6 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3645
3667
Oid polrelid = atooid(PQgetvalue(res, j, i_polrelid));
3646
3668
TableInfo *tbinfo = findTableByOid(polrelid);
3647
3669
3648
-
/*
3649
-
* Ignore row security on tables not to be dumped. (This will
3650
-
* result in some harmless wasted slots in polinfo[].)
3651
-
*/
3652
-
if (!(tbinfo->dobj.dump & DUMP_COMPONENT_POLICY))
3653
-
continue;
3654
-
3655
3670
polinfo[j].dobj.objType = DO_POLICY;
3656
3671
polinfo[j].dobj.catId.tableoid =
3657
3672
atooid(PQgetvalue(res, j, i_tableoid));
@@ -3686,6 +3701,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
0 commit comments