PG4E Course - Database connection error


I wanted to do the PostgreSQL 4 Everybody course (PG4E) with Datagrip as my client.
Unfortunately, I can't make it work, seems there is an error with permission.

Adding Data Source:

But afterwards I get this Error:

Conncetion canceled
[42501] org.postgresql.util.PSQLException: ERROR: permission denied for table pg_database.

If you want to try on your own, you can get a database instance here with login data:

There is an instruction for using DBeaver:
I followed it with DBeaver and everything works great, the databases are showing as expected:

Maybe somebody can help a database newbie :)

Many Thanks


Hello Matthias,

It is expected behavior and DataGrip returns the error due to you do not have access to pg_database table.

It is also pointed out at the bottom of the lesson:

This can cause PostgreSQL clients to complain with errors like the following when they try to access these server-wide databases and schemas.

pg_database table is crucial to get information about the database environment in DataGrip.

You can run a local PostgreSQL server instead e.g. using Docker and connecting to it:

I hope it helps.


Thanks for clarifying it for me! Since it was working in DBeaver I thought it's an issue on my end, missing a setting or so.


Please sign in to leave a comment.