mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where schema diff doesn't show the result of compare if source schema has tables with RLS. Fixes #5998
This commit is contained in:
@@ -632,7 +632,8 @@ class RowSecurityView(PGChildNodeView):
|
||||
|
||||
sql = row_security_policies_utils.get_reverse_engineered_sql(
|
||||
self.conn, schema=schema, table=self.table, scid=scid,
|
||||
plid=oid, datlastsysoid=self.datlastsysoid, with_header=False)
|
||||
plid=oid, policy_table_id=tid,
|
||||
datlastsysoid=self.datlastsysoid, with_header=False)
|
||||
|
||||
drop_sql = ''
|
||||
if drop_req:
|
||||
|
||||
@@ -16,7 +16,7 @@ JOIN pg_namespace n ON n.nspname=rw.schemaname
|
||||
JOIN pg_class rel on rel.relname=rw.tablename
|
||||
WHERE
|
||||
{% if plid %}
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.relfilenode = {{ policy_table_id }};
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
|
||||
{% endif %}
|
||||
{% if tid %}
|
||||
pl.polrelid = {{ tid }};
|
||||
|
||||
@@ -15,7 +15,7 @@ JOIN pg_namespace n ON n.nspname=rw.schemaname
|
||||
JOIN pg_class rel on rel.relname=rw.tablename
|
||||
WHERE
|
||||
{% if plid %}
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.relfilenode = {{ policy_table_id }};
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
|
||||
{% endif %}
|
||||
{% if tid %}
|
||||
pl.polrelid = {{ tid }};
|
||||
|
||||
@@ -15,7 +15,7 @@ JOIN pg_namespace n ON n.nspname=rw.schemaname
|
||||
JOIN pg_class rel on rel.relname=rw.tablename
|
||||
WHERE
|
||||
{% if plid %}
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.relfilenode = {{ policy_table_id }};
|
||||
pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
|
||||
{% endif %}
|
||||
{% if tid %}
|
||||
pl.polrelid = {{ tid }};
|
||||
|
||||
Reference in New Issue
Block a user