partition

Partition routing

Insert through the parent to let the database select the child. Missing matching bounds cause an error unless a suitable default exists.

Formal Syntax & Structure

sql syntaxsql
INSERT INTO parent VALUES (...)

Working Example

Example Snippetsql
-- Run independently in a fresh disposable PostgreSQL database/schema.CREATE TABLE events(d date) PARTITION BY RANGE(d);CREATE TABLE events_jan PARTITION OF events FOR VALUES FROM ('2025-01-01') TO ('2025-02-01');INSERT INTO events VALUES ('2025-01-31');SELECT tableoid::regclass::text FROM events;
SQL Reference