pgadmin-org / pgadmin-org/pgadmin4
ACL SQLs should have single statement even if multiple roles used
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Describe the bug
When an ACL is executed for multiple roles in a single statement, then the RE-SQL should also be a single statement
To Reproduce
Steps to reproduce the behavior:
- Create a view
viewtest
CREATE VIEW public.viewtest
AS
select * from pg_class;
- Execute the SQL assuming you have 2 roles -
role1, role2:
GRANT UPDATE(oid) ON public.viewtest TO role1, role2;
- Go to SQL tab. It shows
GRANT UPDATE(oid) ON public.viewtest TO role1;
GRANT UPDATE(oid) ON public.viewtest TO role2;
Expected behavior
The RE-SQL should also be a single statement. Apart from view, other places table, mview should also be checked.
Screenshots

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the SQL tab output for a view using the multi-role GRANT shown in the issue, then trace the ACL SQL generation path. Done means the reverse SQL uses one statement with both roles and the same behavior is checked for tables and materialized views.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100