PostgreSQL Intellij: fatal: Role XXX does not exist

I can connect to psql and do what I want instead of IntelliJ.

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.

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 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:

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.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 684 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.