Description
dbvr meta database list reports a database name that does not match the database configured in the datasource or the database actually used by the PostgreSQL connection.
The SQL connection works correctly, but the metadata commands appear to use a different database/catalog name.
Environment
- dbvr:
26.1.5.202608161900
- Database: PostgreSQL-compatible
- OS: Linux ARM64
The same behavior was also observed with dbvr 26.1.0.
Datasource configuration
The datasource is configured with a JDBC URL pointing to actual_db:
jdbc:postgresql://db.example.com:5432/actual_db
For example:
dbvr datasource view <datasource-id>
returns:
{
"provider": "postgresql",
"driver": "postgres-jdbc",
"name": "example-ds",
"save-password": true,
"configuration": {
"url": "jdbc:postgresql://db.example.com:5432/actual_db",
"configurationType": "MANUAL",
"type": "dev"
}
}
Actual PostgreSQL connection
Running:
dbvr sql -ds=example-ds "select current_database();"
returns:
|current_database|
|----------------|
|actual_db |
Rows read: 1
So the JDBC connection is definitely connected to actual_db.
Metadata result
However:
dbvr meta database list -ds=example-ds
returns:
Trying to use the actual database name with a metadata command fails:
dbvr meta table list -ds=example-ds -db=actual_db -sn=public
Result:
Error evaluating cli: actual_db' not found
But using the incorrectly reported database name works:
dbvr meta table list -ds=example-ds -db=unexpected_db -sn=public
and correctly lists tables that actually belong to actual_db.
Expected behavior
dbvr meta database list -ds=example-ds should report:
and metadata commands should accept:
since this is both:
- the database specified in the JDBC datasource URL; and
- the value returned by PostgreSQL
current_database().
Actual behavior
The SQL layer connects to actual_db, while the metadata layer exposes it under a different database/catalog name (unexpected_db).
It appears that the database/catalog name resolved by the metadata layer is inconsistent with the actual JDBC connection database.
Description
dbvr meta database listreports a database name that does not match the database configured in the datasource or the database actually used by the PostgreSQL connection.The SQL connection works correctly, but the metadata commands appear to use a different database/catalog name.
Environment
26.1.5.202608161900The same behavior was also observed with dbvr
26.1.0.Datasource configuration
The datasource is configured with a JDBC URL pointing to
actual_db:For example:
returns:
{ "provider": "postgresql", "driver": "postgres-jdbc", "name": "example-ds", "save-password": true, "configuration": { "url": "jdbc:postgresql://db.example.com:5432/actual_db", "configurationType": "MANUAL", "type": "dev" } }Actual PostgreSQL connection
Running:
dbvr sql -ds=example-ds "select current_database();"returns:
So the JDBC connection is definitely connected to
actual_db.Metadata result
However:
returns:
Trying to use the actual database name with a metadata command fails:
Result:
But using the incorrectly reported database name works:
and correctly lists tables that actually belong to
actual_db.Expected behavior
dbvr meta database list -ds=example-dsshould report:and metadata commands should accept:
since this is both:
current_database().Actual behavior
The SQL layer connects to
actual_db, while the metadata layer exposes it under a different database/catalog name (unexpected_db).It appears that the database/catalog name resolved by the metadata layer is inconsistent with the actual JDBC connection database.