PostgreSQL
Versions. CI tests datarig against PostgreSQL 17. Not supported before PostgreSQL 12: a
table’s structure, its DDL, the key marks and copying rows as INSERT (datarig says the server
is too old).
A PostgreSQL profile has driver = "postgres", and a URL starts with postgres://, for
example postgres://me@db.internal:5432/app?sslmode=verify-full
(Connections).
This page gathers what the rest of the guide says about PostgreSQL.
Connecting
- Directly, or through an SSH tunnel and bastion host.
- Encrypted with TLS, as the profile’s
sslmodesays. - Behind PgBouncer or another connection pooler, transaction pooling included.
Safety
- Every statement is parsed with PostgreSQL’s own parser before it is sent, and statements that may do harm ask first (Environments and safety).
- A read-only profile refuses writes before anything is sent, and the server enforces it too.
- Manual commit keeps your changes in a transaction until you commit or roll it back; Startup SQL sets what each session starts with.
Working with data
- The SQL editor with vim keys and completion, the results grid, filtering and sorting a table on the server, editing data with the exact statements shown first, export and charts.
- Query plans:
EXPLAINandEXPLAIN ANALYZEas a tree and several other views. - The server monitor (PostgreSQL 12 or later): load, sessions, locks and replication.
Something missing or wrong? See the FAQ, or open an issue on GitHub.