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
@@ -3833,7 +3853,9 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3833
3853
" 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, "
3834
3854
"pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, "
3835
3855
"pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck "
3836
-
"FROM pg_catalog.pg_policy pol");
3856
+
"FROM unnest('%s'::pg_catalog.oid[]) AS src(tbloid)\n"
3857
+
"JOIN pg_catalog.pg_policy pol ON (src.tbloid = pol.polrelid)",
3858
+
tbloids->data);
3837
3859
3838
3860
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
3839
3861
@@ -3857,13 +3879,6 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
3857
3879
Oid polrelid = atooid(PQgetvalue(res, j, i_polrelid));
3858
3880
TableInfo *tbinfo = findTableByOid(polrelid);
3859
3881
3860
-
/*
3861
-
* Ignore row security on tables not to be dumped. (This will
3862
-
* result in some harmless wasted slots in polinfo[].)
3863
-
*/
3864
-
if (!(tbinfo->dobj.dump & DUMP_COMPONENT_POLICY))
3865
-
continue;
3866
-
3867
3882
polinfo[j].dobj.objType = DO_POLICY;
3868
3883
polinfo[j].dobj.catId.tableoid =
3869
3884
atooid(PQgetvalue(res, j, i_tableoid));
@@ -3898,6 +3913,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
0 commit comments