Examples for

PostgreSQL

30 examples, in learning order. The reference dialect, with extension hooks for flavours such as TimescaleDB.

Parameters
$1 or :name
RETURNING
Supported
Go code for
database/sql, pgx
Migrations
Built in (PostgreSQL)
Driver
pgx
All about the PostgreSQL dialect

Getting started

4 examples

Types and nullability

5 examples

Dynamic queries

5 examples

Shaping results

5 examples

Writing data

3 examples

Connections and transactions

3 examples

Migrations and seeds

3 examples

Engine features

2 examples
Show 23 not available for PostgreSQL

Some ideas belong to other engines, and some need a feature PostgreSQL does not have. Each one says why, and where to read it instead.