Skip to main content
Version: Next
PostgreSQL is an advanced open-source relational database.
Installation
Required packages: psycopg2
Connection String
postgresql://{username}:{password}@{host}:{port}/{database}
ParameterDescription
usernameDatabase username
passwordDatabase password
hostFor localhost: localhost or 127.0.0.1. For AWS: endpoint URL
portDefault 5432
databaseDatabase name
Default port: 5432
Connection Examples
Basic connection
postgresql://{username}:{password}@{host}:{port}/{database}
With SSL required
postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=require
Supported Features
JOINsSubqueriesDynamic SchemaCatalog SupportDynamic CatalogSSH TunnelingQuery CancellationFile UploadUser ImpersonationCost EstimationSQL Validation
Feature Score: 104/201
Time Grains
Common Time Grains:
SECONDMINUTEHOURDAYWEEKMONTHQUARTERYEAR
Extended Time Grains:
FIVE_SECONDSTHIRTY_SECONDSFIVE_MINUTESTEN_MINUTESFIFTEEN_MINUTESTHIRTY_MINUTESHALF_HOURSIX_HOURSWEEK_STARTING_SUNDAYWEEK_STARTING_MONDAYWEEK_ENDING_SATURDAYWEEK_ENDING_SUNDAYQUARTER_YEAR
Troubleshooting
Common error messages you may encounter when connecting to or querying PostgreSQL, along with their causes and solutions.
Compatible Databases
The following databases are compatible with the PostgreSQL driver:
HologresHologres
Alibaba Cloud real-time interactive analytics service, fully compatible with PostgreSQL 11.
postgresql+psycopg2://{username}:{password}@{host}:{port}/{database}
Parameters:
ParameterDescription
usernameAccessKey ID of your Alibaba Cloud account
passwordAccessKey secret of your Alibaba Cloud account
hostPublic endpoint of the Hologres instance
portPort number of the Hologres instance
databaseName of the Hologres database
TimescaleDBTimescaleDB
Open-source relational database for time-series and analytics, built on PostgreSQL.
postgresql://{username}:{password}@{host}:{port}/{database}
YugabyteDBYugabyteDB
Distributed SQL database built on top of PostgreSQL.
postgresql://{username}:{password}@{host}:{port}/{database}
SupabaseSupabase
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:
ParameterDescription
usernameDatabase user (default: postgres)
passwordDatabase password
hostSupabase project host (from project settings)
portDefault 5432 (direct) or 6543 (pooler)
databaseDatabase name (default: postgres)
Google AlloyDBGoogle AlloyDB
Google Cloud's PostgreSQL-compatible database service for demanding transactional and analytical workloads.
postgresql://{username}:{password}@{host}:{port}/{database}
Parameters:
ParameterDescription
usernameDatabase user (default: postgres)
passwordDatabase password
hostAlloyDB instance IP or Auth Proxy address
portDefault 5432
databaseDatabase name
NeonNeon
Serverless PostgreSQL with branching, scale-to-zero, and bottomless storage.
postgresql://{username}:{password}@{host}/{database}?sslmode=require
Parameters:
ParameterDescription
usernameNeon role name
passwordNeon role password
hostNeon hostname (e.g., ep-cool-name-123456.us-east-2.aws.neon.tech)
databaseDatabase name (default: neondb)
Amazon Aurora PostgreSQLAmazon Aurora PostgreSQL
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}&region_name={region_name}
Parameters:
ParameterDescription
aws_access_idAWS Access Key ID
aws_secret_access_keyAWS Secret Access Key
database_nameDatabase name
aurora_cluster_arnAurora cluster ARN
secret_arnSecrets Manager ARN for credentials
region_nameAWS region (e.g., us-east-1)
Help improve this documentation by editing the engine spec: