Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psql should assume role set in server properties #5807

Closed
adityatoshniwal opened this issue Feb 1, 2023 · 6 comments
Closed

psql should assume role set in server properties #5807

adityatoshniwal opened this issue Feb 1, 2023 · 6 comments
Assignees
Milestone

Comments

@adityatoshniwal
Copy link
Contributor

adityatoshniwal commented Feb 1, 2023

Describe the bug
psql is not taking the role set in the server properties.
When a role is set in server properties, the role is assumed when a new connection is created. Currently, this is happening for query tool but not for psql.

To Reproduce

Steps to reproduce the behavior:

  1. Set the role in the server properties.
  2. Open psql
  3. Execute sql - SELECT current_user, session_user;

Expected behavior
SELECT current_user, session_user should return otherrole, postgres.

Desktop (please complete the following information):

  • OS: Mac OS Big Sur
  • Version: 6.19
  • Mode: Desktop
@pr2git
Copy link

pr2git commented Feb 9, 2023

I report the same bug in release 6.18 and it is now fixed in release 6.20.

@adityatoshniwal
Copy link
Contributor Author

Still not working for me in v6.20.

@pr2git
Copy link

pr2git commented Feb 9, 2023

Delete your current server and create it again.
The bug was that they saved the role as username, so if you create a server with 6.18 or 6.19 your are impacted by the bug, in 6.20 the username and role are properly saved so you need to create it again.

@adityatoshniwal
Copy link
Contributor Author

@pr2git The roles and username were correctly saved. There was code bug which was taking role as username.

@pr2git
Copy link

pr2git commented Feb 9, 2023

So do you explain that existing servers were working but newly added were not?
If it was a bug like you describe the existing servers won't work.
By the way I am happy that it is now fixed in 6.20. :-)

@pravesh-sharma pravesh-sharma self-assigned this Oct 20, 2023
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Oct 30, 2023
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Oct 31, 2023
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Nov 1, 2023
…in server properties. pgadmin-org#5807

2. Corrected title in query tool connection link.
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Nov 1, 2023
…in server properties. pgadmin-org#5807

2. Corrected title in query tool connection link.
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Nov 1, 2023
…in server properties. pgadmin-org#5807

2. Corrected title in query tool connection link.
akshay-joshi pushed a commit that referenced this issue Nov 2, 2023
…in server properties. #5807

2. Corrected title in query tool connection link.
@akshay-joshi akshay-joshi added this to the 7.9 milestone Nov 2, 2023
@pravesh-sharma pravesh-sharma removed their assignment Nov 2, 2023
@anilsahoo20
Copy link
Contributor

Tested and verified on snapshot build: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2023-11-13/
Environment: macOs Ventura 13.5.1
Package: arm64 and pip wheel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants