For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/ddsql_reference/data_directory/dd/dd.postgres_tables.dataset.md. A documentation index is available at /llms.txt.

PostgreSQL Tables

The PostgreSQL Tables table provides metadata about database tables discovered in PostgreSQL databases. Each row represents a table and includes information such as columns, indexes, foreign keys, partitioning, and ownership. This table enables you to inventory database schemas, track table modifications, analyze table structures, and monitor database metadata across your PostgreSQL infrastructure.

dd.postgres_tables

Fields

TitleIDTypeData TypeDescription
Key_keycorestringUnique identifier for the PostgreSQL table record.
Table Nametable_namecorestringName of the database table.
Display Namedisplay_namecorestringHuman-readable display name for the table.
DescriptiondescriptioncorestringDescription of the table.
ColumnscolumnscorejsonJSON array containing column definitions including name, data type, nullability, and default values.
IndexesindexescorejsonJSON array containing index definitions including name, columns, and uniqueness.
Foreign Keysforeign_keyscorejsonJSON array containing foreign key constraints and referenced tables.
OwnerownercorestringOwner of the table.
Number of Partitionsnum_partitionscoreint64Number of partitions for the table.
Partition Keypartition_keycorestringColumn used for partitioning.
TOAST Tabletoast_tablecorestringAssociated TOAST table for large objects.
IDidcorestringInternal identifier for the table.
Postgres Schema Keypostgres_schema_keycorestringUsed to join this table to dd.postgres_schemas to get schema name and walk the hierarchy (table to schema to logical database to database instance).