Structs§
- Check
Constraint - Column
- Column
Mapping - Mapping from virtual column name (what apps see) to physical column name in the base table. Used during expand/contract migrations where temporary columns (e.g., pgroll_new*) are created.
- Default
Privilege - A default privilege entry - privileges automatically granted when a role creates objects
- Domain
- Domain
Constraint - Enum
Type - Extension
- Foreign
Key - Function
- Function
Arg - Grant
- Index
- Partition
- Partition
Key - Pending
Comment - Pending
Grant - Represents a pending GRANT parsed from a GRANT statement. Used for cross-file resolution when GRANT statements are in separate files from object definitions.
- Pending
Owner - Represents a pending ownership assignment parsed from ALTER … OWNER TO statements. Used for cross-file resolution when object definitions and ownership are in separate files.
- Pending
Revoke - Represents a pending REVOKE parsed from a REVOKE statement. Used for cross-file resolution when REVOKE statements are in separate files from object definitions.
- PgSchema
- Represents a PostgreSQL schema (namespace).
- Policy
- Primary
Key - Qualified
Name - A PostgreSQL qualified name consisting of a schema and object name.
- Schema
- Sequence
- Sequence
Owner - Table
- Trigger
- Version
Schema - Metadata about a version schema used for expand/contract migrations.
- Version
View - A view in a version schema that maps to a base table. Used for zero-downtime migrations where multiple schema versions coexist.
- View
Enums§
- ArgMode
- Default
Privilege Object Type - Object types that can have default privileges
- Index
Type - Partition
Bound - Partition
Strategy - Pending
Comment Object Type - Pending
Grant Object Type - Pending
Owner Object Type - PgType
- Policy
Command - Privilege
- Referential
Action - Security
Type - Sequence
Data Type - Trigger
Enabled - Trigger
Event - Trigger
Timing - Volatility
Functions§
- normalize_
pg_ type - Normalizes PostgreSQL type aliases to their canonical forms. This ensures consistent comparison between parsed SQL and introspected schemas.
- parse_
qualified_ name - Parses a qualified name into (schema, name) tuple. Defaults to “public” schema if no dot separator found.
- qualified_
name - Creates a qualified name from schema and object name. Used as map keys for schema-aware lookups.
- revoke_
from_ grants - Removes or modifies grants matching the given grantee and privileges.
- versioned_
schema_ name - Helper to create a versioned schema name from base schema and version.