can't see new databases for postresql

Lex's profile image Lex posted 4 years ago in General Permalink
  1. Win 10, PosgreSQL 13.7, HeidiSQL 12.1. Localhost with 'postgres' user and stored password. I create new session, create new database in root folder, but it can't be seen them in list at all! I can see those databases from other client. See screenshots.

  2. Can't flush privileges - syntax error after pushing button.

I can do working session with MySQL database with no such issues. What i am doing wrong?

3 attachment(s):
  • starting
  • session
  • flushing
ansgar's profile image ansgar posted 4 years ago Permalink

What does the "Database" dropdown in the session manager show when you open it?

Lex's profile image Lex posted 4 years ago Permalink

It contains my created databases and default 'postgres' database (if i remember right). Description

ansgar's profile image ansgar posted 4 years ago Permalink

Please also look at the "Hide database pattern" in the Advanced tab.

And what if you select one of the newly created databases in the dropdown?

Lex's profile image Lex posted 4 years ago Permalink

I tried to solve problem earlier and deleted those pattern. Description If i select any of my databases in dropdown list, nothing changes after save and open session...

Lex's profile image Lex posted 4 years ago Permalink

some access denied commented message after changing database to test1 Description By the way, i change language from russian to english and restarts but all service messages still on russian.

Lex's profile image Lex posted 4 years ago Permalink

No ideas?

ansgar's profile image ansgar posted 4 years ago Permalink

That is most likely a message from the server, not from HeidiSQL directly.

Lex's profile image Lex posted 4 years ago Permalink

i doubt it. Other clients functional normally with same Postgresql server. Issue is on HeidiSQL side.

tangqiu's profile image tangqiu posted 3 years ago Permalink

I also have the same problem, No matter how many tables HeidiSql creates, it will not be displayed.

Description

codesmith's profile image codesmith posted 3 weeks ago Permalink

To clarify for those coming here years later, PostgreSQL works very differently than MySQL. If you're used to using HeidiSQL for MySQL, this is probably not obvious:

HeidiSQL can only connect to one PostgreSQL database at a time.

You specify which database you want to connect to via the "Database" field in the session manager before connecting to the server.

Once connected you'll most likely always see the same thing:

information_schema
pg_catalog
pg_toast
public

These are pg schemas, not databases like they would be if you were connecting to a MySQL server. You should normally create and manage your custom tables in the public schema. The other schemas hold details about this database (and maybe others?).

User Management:

Also, the user management for PostgreSQL is plain broken in HeidiSQL. You'll have to use the raw commands. Users are called 'roles' in PostgreSQL. Here are a few links:

  • Official Reference on Roles:   www . postgresql . org/docs/current/user-manag.html
  • Official Reference on Grants:   www . postgresql . org/docs/current/sql-grant.html
  • A Helpful Cheat Sheet:   linuxize . com/post/postgresql-user-management

PostgreSQL offers quite a bit more granular access (e.g., per table grants), which may be partly why HeidiSQL's user manager hasn't been updated to support PostgreSQL yet.

ansgar's profile image ansgar posted 3 weeks ago Permalink

Regarding PG user management: Some days ago I gave Perplexity a chance to create a role manager for PostgreSQL. After fixing lots of control anchorings, here it is, in the Lazarus codebase and in the v13 preview version for Windows. AI made a lot of mistakes I'm afraid, so I guess it throws a lot of exceptions due to SQL queries feed with the wrong number of parameters. But it is probably a good starting point.

Related to issue #80

grafik.png

Please login to leave a reply, or register at first.