---
title: PostgreSQL Tables
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > DDSQL Reference > Data Directory > PostgreSQL Tables
---

# 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

| Title                | ID                  | Type | Data Type | Description                                                                                                                                          |
| -------------------- | ------------------- | ---- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Key                  | _key                | core | string    | Unique identifier for the PostgreSQL table record.                                                                                                   |
| Table Name           | table_name          | core | string    | Name of the database table.                                                                                                                          |
| Display Name         | display_name        | core | string    | Human-readable display name for the table.                                                                                                           |
| Description          | description         | core | string    | Description of the table.                                                                                                                            |
| Columns              | columns             | core | json      | JSON array containing column definitions including name, data type, nullability, and default values.                                                 |
| Indexes              | indexes             | core | json      | JSON array containing index definitions including name, columns, and uniqueness.                                                                     |
| Foreign Keys         | foreign_keys        | core | json      | JSON array containing foreign key constraints and referenced tables.                                                                                 |
| Owner                | owner               | core | string    | Owner of the table.                                                                                                                                  |
| Number of Partitions | num_partitions      | core | int64     | Number of partitions for the table.                                                                                                                  |
| Partition Key        | partition_key       | core | string    | Column used for partitioning.                                                                                                                        |
| TOAST Table          | toast_table         | core | string    | Associated TOAST table for large objects.                                                                                                            |
| ID                   | id                  | core | string    | Internal identifier for the table.                                                                                                                   |
| Postgres Schema Key  | postgres_schema_key | core | string    | Used 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). |
