Introspection
Database Introspection
When you connect a data source, Monospace reads your database schema and maps it to your Data Model. Tables become collections, columns become fields, and foreign key constraints become relations.
If your database schema changes outside of Monospace, re-introspecting the data source will detect additions and removals.
What Gets Discovered
Monospace introspects the following database objects:
- Tables — mapped to collections
- Partitioned tables — mapped to a single collection representing the parent table; child partitions are excluded
- Views and materialized views — mapped to read-only collections
- Columns — mapped to fields, including nullability and default values
- Foreign key constraints — mapped to relations, including referential actions (cascade, set null, etc.)
- Indexes — primary keys, unique indexes, and regular indexes
- Schemas (PostgreSQL namespaces) — preserved as namespaces within the data source
Generated columns (GENERATED ALWAYS AS IDENTITY, GENERATED ALWAYS ... STORED) are detected and marked as read-only.
What Is Not Introspected
The following database objects are not discovered during introspection:
- Check constraints
- Stored procedures, functions, and triggers
- Row-level security (RLS) policies
- Table and column comments
- Expression-based indexes
- Partial (conditional) indexes
- Exclusion constraints
Unsupported Column Types
Columns with types that Monospace does not support are still visible in the Data Model, but are excluded from the API — they cannot be queried, filtered, or written to.
The following PostgreSQL types are currently unsupported:
- Enum types
- Range types (
int4range,tsrange, etc.) - Composite / custom types
- Multi-dimensional arrays
money,interval- Geometric types (
point,line,box,polygon,circle, etc.) - Full-text search types (
tsvector,tsquery) xml- Network types (
macaddr,macaddr8)
For the complete mapping of supported database types to Monospace field types, see Type Support.
Known Limitations
Composite Foreign Keys
Composite foreign keys (constraints spanning multiple columns) are fully supported.
Self-Referencing Relations
Tables with foreign keys referencing themselves are fully supported.