-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The "Load Databases" feature fails when connecting to a PostgreSQL instance with the following error:
error occurred while decoding column datname: error in Any driver mapping: Any driver does not support the Postgres type PgTypeInfo(Name)
This happens because the datname column in the pg_database table uses the internal PostgreSQL name type, which sqlx's Any driver doesn't seem to support directly.
Steps to Reproduce
- Create a PostgreSQL connection.
- Click on "Load Databases" (which calls
list_databasestauri command) in the connection modal. - Observe the error message.
Expected Behavior
The list of databases should be loaded correctly.
Possible Fix
Cast datname to TEXT in the queries:
- In
src-tauri/src/drivers/postgres.rs(functionget_databases):
SELECT datname::text FROM pg_database WHERE datistemplate = false ORDER BY datname;- In
src-tauri/src/commands.rs(functionlist_databases):
SELECT datname::text FROM pg_database WHERE datistemplate = false ORDER BY datname;Context
- File:
src-tauri/src/drivers/postgres.rs,src-tauri/src/commands.rs - Functions:
get_databases,list_databases
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working