pg_connect
Connect to a PostgreSQL database using a connection URL or individual parameters like host, port, database, user, password, and SSL. Optionally enable read-only mode to block modifications.
Instructions
Connect to a PostgreSQL database using a URL or individual parameters
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | Yes | Unique identifier for this connection | |
| url | No | PostgreSQL connection URL (e.g., postgresql://user:pass@host:5432/dbname?ssl=true) | |
| host | No | PostgreSQL host (ignored if url is provided) | |
| port | No | PostgreSQL port (default: 5432, ignored if url is provided) | |
| database | No | Database name (ignored if url is provided) | |
| user | No | Username (ignored if url is provided) | |
| password | No | Password (ignored if url is provided) | |
| ssl | No | Use SSL connection (default: false, ignored if url is provided) | |
| readOnly | No | Enable read-only mode - blocks INSERT, UPDATE, DELETE, and DDL operations (default: true) |