PostgreSQL Tools Documentation
This document lists all available Postgres tools and their usage.
Tools
Tool Name | Description | Parameters |
---|---|---|
postgresql_execute_database_query |
Execute SQL queries against a PostgreSQL database | - connection_id (string): The ID of the PostgreSQL connection to use- sql_query (string): The SQL query to execute |
postgresql_list_database_connections |
List all available PostgreSQL connections | None |
Configuration
Required Parameters
Before connecting to PostgreSQL, you'll need to gather the following information:
- PostgreSQL Host - The server address where your PostgreSQL database is running (e.g.,
localhost
ordb.example.com
) - PostgreSQL Port - The port number PostgreSQL is listening on (default is
5432
) - PostgreSQL Database - The name of the database you want to connect to
- PostgreSQL Username - Your database user account
- PostgreSQL Password - Your database user password
- PostgreSQL Schema (optional) - The specific schema you want to use (defaults to
public
if not specified)
Connection String Format
The standard PostgreSQL connection string format is:
Example:
Troubleshooting
If you encounter connection issues:
- Check if the PostgreSQL server is running
- Verify your credentials are correct
- Ensure the database exists and is accessible
- Check network connectivity to the host and port
- Verify your IP is allowed in PostgreSQL's access control lists (pg_hba.conf)
For additional help or specific error messages, consult the PostgreSQL documentation.