PG4E Course - Database connection error

已回答

Hello,
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:
https://www.pg4e.com/lessons_launch/pg4e_00_setup

There is an instruction for using DBeaver:
https://youtu.be/xFv-TeIroV8
I followed it with DBeaver and everything works great, the databases are showing as expected:

Maybe somebody can help a database newbie :)

Many Thanks
Matthias

评论操作 固定链接

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: https://hub.docker.com/_/postgres

I hope it helps.

1
评论操作 固定链接

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.

0

请先登录再写评论。