View Source Introspex.Postgres.Introspector (Introspex v0.2.0)

Introspects PostgreSQL database schema including tables, views, materialized views, columns, constraints, and foreign keys.

Summary

Functions

Decodes PostgreSQL foreign key action codes to atoms.

Gets detailed column information for a specific table.

Gets foreign key relationships for a table.

Gets primary key information for a table.

Gets unique constraints for a table (excluding primary key).

Lists all tables, views, and materialized views in the specified schema.

Parses PostgreSQL default values, removing type casts and sequence defaults.

Functions

Decodes PostgreSQL foreign key action codes to atoms.

Link to this function

get_check_constraints(repo, table_name, schema \\ "public")

View Source

Gets check constraints for a table.

Link to this function

get_columns(repo, table_name, schema \\ "public")

View Source

Gets detailed column information for a specific table.

Link to this function

get_foreign_keys(repo, table_name, schema \\ "public")

View Source

Gets foreign key relationships for a table.

Link to this function

get_indexes(repo, table_name, schema \\ "public")

View Source

Gets indexes for a table.

Link to this function

get_primary_keys(repo, table_name, schema \\ "public")

View Source

Gets primary key information for a table.

Link to this function

get_unique_constraints(repo, table_name, schema \\ "public")

View Source

Gets unique constraints for a table (excluding primary key).

Link to this function

list_tables(repo, schema \\ "public", exclude_views \\ false)

View Source

Lists all tables, views, and materialized views in the specified schema.

Parses PostgreSQL default values, removing type casts and sequence defaults.