PostgreSQL version: postgres (PostgreSQL) 9.6.1
IntelliJ version: 2016.3.1
IntelliJ configuration:
URL: jdbc:postgresql://localhost:5432/sample
User: sample
Pwd: sample
Test connection: successful
So, I connect (red square appears), and then try a simple query:< /p>
select 1;
I received an error:
FATAL: role'xxx' doesn' t exist`
Why does IntelliJ not use the role specified in my configuration and want to use my personal login? No matter what I use as a role, I still get the same error.
Note: If I add the system username as a role, it can be used, but I prefer to avoid this.
ALTER ROLE sample LOGIN
File description:
Only roles that have the LOGIN attribute can be used as the initial
role name for a database connection
However, I can connect in CLI and perform the operations I want, because I can “connect” in IntelliJ but do not perform queries, there is no such attribute. Welcome Provide more details about this behavior.
I am able to connect to psql and do what I want instead of IntelliJ.
< /p>
PostgreSQL version: postgres (PostgreSQL) 9.6.1
IntelliJ version: 2016.3.1
IntelliJ configuration:
URL: jdbc:postgresql://localhost:5432/sample
User: sample
Pwd: sample
Test connection: successful
So, I connect ( A red square appears), and then try a simple query:
select 1;
I received an error:
p>
FATAL: role'xxx' doesn't exist`
Why does IntelliJ not use the role specified in my configuration and want to use my personal login? No matter what I use as a role, I still get the same error.
Note: If I add the system username as a role, it can be used, but I prefer to avoid this.
Adding the LOGIN role attribute can solve the problem:
ALTER ROLE sample LOGIN
File description:
Only roles that have the LOGIN attribute can be used as the initial
role name for a database connection
However, I can connect in the CLI and perform the operations I want, because I can “connect” in IntelliJ but not perform queries, there is no such attribute. More details about this behavior are welcome.