Create PostgreSQL Connection
create_postgresql_connectionCreate and save a new PostgreSQL connection in QGIS using stored authentication credentials, with no passwords. Validates database reachability and rejects duplicate names.
Instructions
Validate and save a new PostgreSQL Browser-panel connection. Credentials must be held in an existing QGIS Authentication Manager configuration; passwords are never accepted. Fails if name already exists or the database cannot be reached. port must be the actual database port supplied by the caller or user - this tool does not assume a default such as 5432. ssl_mode is one of prefer (default), disable, allow, require, verify-ca, or verify-full.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| name | Yes | ||
| port | Yes | ||
| database | Yes | ||
| ssl_mode | No | prefer | |
| auth_config_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||