PostgreSQL is an advanced open-source relational database.
Required packages: psycopg2
postgresql://{username}:{password}@{host}:{port}/{database}Parameter Description username Database username password Database password host For localhost: localhost or 127.0.0.1. For AWS: endpoint URL port Default 5432 database Database name
Default port: 5432 Basic connection postgresql://{username}:{password}@{host}:{port}/{database}With SSL required postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=requireJOINs Subqueries Dynamic Schema Catalog Support Dynamic Catalog SSH Tunneling Query Cancellation File Upload User Impersonation Cost Estimation SQL Validation Feature Score: 104/201
Common Time Grains: SECOND MINUTE HOUR DAY WEEK MONTH QUARTER YEAR
Extended Time Grains: FIVE_SECONDS THIRTY_SECONDS FIVE_MINUTES TEN_MINUTES FIFTEEN_MINUTES THIRTY_MINUTES HALF_HOUR SIX_HOURS WEEK_STARTING_SUNDAY WEEK_STARTING_MONDAY WEEK_ENDING_SATURDAY WEEK_ENDING_SUNDAY QUARTER_YEAR
Common error messages you may encounter when connecting to or querying PostgreSQL, along with their causes and solutions.
The following databases are compatible with the PostgreSQL driver:
Alibaba Cloud real-time interactive analytics service, fully compatible with PostgreSQL 11.
postgresql+psycopg2://{username}:{password}@{host}:{port}/{database}Parameters: Parameter Description username AccessKey ID of your Alibaba Cloud account password AccessKey secret of your Alibaba Cloud account host Public endpoint of the Hologres instance port Port number of the Hologres instance database Name of the Hologres database
Open-source relational database for time-series and analytics, built on PostgreSQL.
postgresql://{username}:{password}@{host}:{port}/{database}psycopg2 comes bundled with Superset Docker images.
Distributed SQL database built on top of PostgreSQL.
postgresql://{username}:{password}@{host}:{port}/{database}psycopg2 comes bundled with Superset Docker images.
Open-source Firebase alternative built on top of PostgreSQL, providing a full backend-as-a-service with a hosted Postgres database.
postgresql://{username}:{password}@{host}:{port}/{database}Parameters: Parameter Description username Database user (default: postgres) password Database password host Supabase project host (from project settings) port Default 5432 (direct) or 6543 (pooler) database Database name (default: postgres)
Find connection details in your Supabase project dashboard under Settings > Database. Use the connection pooler (port 6543) for better connection management.
Google Cloud's PostgreSQL-compatible database service for demanding transactional and analytical workloads.
postgresql://{username}:{password}@{host}:{port}/{database}Parameters: Parameter Description username Database user (default: postgres) password Database password host AlloyDB instance IP or Auth Proxy address port Default 5432 database Database name
For public IP connections, use the AlloyDB Auth Proxy for secure access. Private IP connections can connect directly.
Serverless PostgreSQL with branching, scale-to-zero, and bottomless storage.
postgresql://{username}:{password}@{host}/{database}?sslmode=requireParameters: Parameter Description username Neon role name password Neon role password host Neon hostname (e.g., ep-cool-name-123456.us-east-2.aws.neon.tech) database Database name (default: neondb)
SSL is required for all connections. Find connection details in the Neon console under Connection Details.
Amazon Aurora PostgreSQL is a fully managed, PostgreSQL-compatible relational database with up to 5x the throughput of standard PostgreSQL.
postgresql+auroradataapi://{aws_access_id}:{aws_secret_access_key}@/{database_name}?aurora_cluster_arn={aurora_cluster_arn}&secret_arn={secret_arn}®ion_name={region_name}Parameters: Parameter Description aws_access_id AWS Access Key ID aws_secret_access_key AWS Secret Access Key database_name Database name aurora_cluster_arn Aurora cluster ARN secret_arn Secrets Manager ARN for credentials region_name AWS region (e.g., us-east-1)
Uses the Data API for serverless access. Standard PostgreSQL connections also work with psycopg2.
Notes
The psycopg2 library comes bundled with Superset Docker images.
Help improve this documentation by editing the engine spec: