Postgres: general setting 'show all databases' doesn't work, only the default database is shown
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 185
Description
### Description
In the preferences under Connections/Drivers/PostgreSQL 'show all databases' and 'show databases not available for connection' is ticked.
When creating a new connection you would assume that automatically all databases would be shown but that is not the case.
Nevertheless, if I check the connection settings of a connection I just created, under the PostgreSQL tab indeed 'show all databases' is ticked. Why doesn't it become visible?
So I went to have a look at data-sources.json and saw that the driver properties part is missing.
The strange thing is when I edit the connection , save and reconnect suddenly the driver properties part appears:
e.g.
"provider-properties": {
"@dbeaver-show-non-default-db@": "true",
"@dbeaver-show-template-db@": "false",
"@dbeaver-show-unavailable-db@": "false",
"show-database-statistics": "true",
"@dbeaver-read-all-data-types-db@": "false",
"read-keys-with-columns": "false",
"@dbeaver-use-prepared-statements-db@": "false",
"postgresql.dd.plain.string": "false",
"postgresql.dd.tag.string": "false"
}
Why do I need to edit the connection to get the provider properties part in the data-sources.json?
So as a workaround I figured, I could adapt the drivers.xml and add parameter lines in the driver id part. But I don't know if it would help and if so what the syntax would be?
I also checked the debug logging and there it states that it will start up the default database, no errors
### DBeaver Version
Community edition 23.0.2
### Operating System
windows
### Database and driver
postgresql-42.6.0.jar
### Steps to reproduce
In the preferences under Connections/Drivers/PostgreSQL 'show all databases' and 'show databases not available for connection' is ticked.
When creating a new connection you would assume that automatically all databases would be shown but that is not the case.
Nevertheless, if I check the connection settings of a connection I just created, under the PostgreSQL tab indeed 'show all databases' is ticked. Why doesn't it become visible?
So I went to have a look at data-sources.json and saw that the driver properties part is missing.
The strange thing is when I edit the connection , save and reconnect suddenly the driver properties part appears:
e.g.
"provider-properties": {
"@dbeaver-show-non-default-db@": "true",
"@dbeaver-show-template-db@": "false",
"@dbeaver-show-unavailable-db@": "false",
"show-database-statistics": "true",
"@dbeaver-read-all-data-types-db@": "false",
"read-keys-with-columns": "false",
"@dbeaver-use-prepared-statements-db@": "false",
"postgresql.dd.plain.string": "false",
"postgresql.dd.tag.string": "false"
}
Why do I need to edit the connection to get the provider properties part in the data-sources.json?
So as a workaround I figured, I might need to adapt the drivers.xml and add parameter lines in the driver id part. I don't know if it would help and if so what the syntax would be?
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the PostgreSQL connection setup described in the issue, then inspect data-sources.json before and after editing and reconnecting the connection. Compare this with the relevant driver entry in drivers.xml; done means a newly created connection persists the provider properties and shows the configured non-default and unavailable databases without manual editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100