Fixed an issue where the wrong SQL displayed in difference if the user create 

an RLS policy on the table without a column. Fixes #7637
This commit is contained in:
Nikhil Mohite
2022-09-15 16:40:03 +05:30
committed by Akshay Joshi
parent 9ac233f244
commit 769f58970e
2 changed files with 4 additions and 4 deletions

View File

@@ -633,11 +633,10 @@ class RowSecurityView(PGChildNodeView):
drop_sql = ''
if drop_req:
drop_sql = '\n' + self.delete(gid=1, sid=sid, did=did,
scid=scid, tid=tid,
plid=oid, only_sql=True)
drop_sql = self.delete(gid=1, sid=sid, did=did,
scid=scid, tid=tid, plid=oid, only_sql=True)
if drop_sql != '':
sql = drop_sql + '\n\n' + sql
sql = drop_sql + '\n\n'
return sql
@check_precondition