Part of the Phase 2 set of PostgreSQL-specific features beyond the built-in driver.
Problem
Declarative partitioned tables (PARTITION BY RANGE/LIST/HASH) are common in production PostgreSQL schemas, but Tabularis currently shows a partitioned table's children as unrelated, disconnected entries in the table list — there's no indication of the parent/child relationship, partition key, or bounds.
Proposed approach
-- Find partitioned tables
SELECT c.relname, pg_get_partkeydef(c.oid) as partition_key
FROM pg_class c
JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE c.relkind = 'p' AND n.nspname = $1;
-- Find partitions of a parent table
SELECT c.relname, pg_get_expr(c.relpartbound, c.oid) as partition_bound
FROM pg_inherits i
JOIN pg_class c ON i.inhrelid = c.oid
WHERE i.inhparent = (SELECT oid FROM pg_class WHERE relname = $1);
Frontend integration
- Partitioned tables show with a distinct icon in the sidebar.
- Expanding a partitioned table shows its child partitions with their bounds.
- Context menu adds "Create Partition" / "Detach Partition" actions.
Acceptance criteria
Tests
test_get_partitioned_tables — identifies partition parents
test_get_partitions — lists children with bounds
test_partition_range_bounds — range partition display
test_partition_list_bounds — list partition display
References
- Full spec:
docs/planning/03-phase-2-issue-16.md (2.4)
- Priority: Sprint 4 — medium demand
Part of the Phase 2 set of PostgreSQL-specific features beyond the built-in driver.
Problem
Declarative partitioned tables (
PARTITION BY RANGE/LIST/HASH) are common in production PostgreSQL schemas, but Tabularis currently shows a partitioned table's children as unrelated, disconnected entries in the table list — there's no indication of the parent/child relationship, partition key, or bounds.Proposed approach
Frontend integration
Acceptance criteria
Tests
test_get_partitioned_tables— identifies partition parentstest_get_partitions— lists children with boundstest_partition_range_bounds— range partition displaytest_partition_list_bounds— list partition displayReferences
docs/planning/03-phase-2-issue-16.md(2.4)