Postgre SQL
Schema-driven source documentation.
POSTGRESQL39 fields3 examples
Commonly Asked Questions
Assistant knowledge mapped to this source type from
assistant_knowledge.json.Required
Fields required for a valid configuration payload under `config.required`.
| Path | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
| required | object | Yes | — | — | no extra properties |
| required.host | string | Yes | PostgreSQL host | localhost | — |
| required.port | integer | Yes | PostgreSQL port | 5432 | min 1, max 65535 |
Masked
Sensitive fields under `config.masked` (secrets/credentials).
| Path | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
| masked | object | Yes | — | — | no extra properties |
| masked.password | string | Yes | Database password | — | — |
| masked.username | string | Yes | Database username | — | — |
Optional
Optional configuration fields under `config.optional`.
| Path | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
| optional | object | No | — | — | no extra properties |
| optional.connection | object | No | Connection tuning and SSL behavior. | — | no extra properties |
| optional.connection.connect_timeout_seconds | integer | No | Connection timeout in seconds | 10 | min 1, max 120 |
| optional.connection.ssl_mode | enum | No | SSL mode for PostgreSQL connection Allowed values: disable, allow, prefer, require, verify-ca, verify-full | prefer | — |
| optional.scope | object | No | Database, schema, and table selection scope. | — | no extra properties |
| optional.scope.database | string | No | Single database to scan (optional when include_all_databases is true) | — | — |
| optional.scope.exclude_schemas | array | No | Schema denylist (exact schema names) | ["information_schema","pg_catalog","pg_toast"] | — |
| optional.scope.exclude_schemas[] | string | No | — | — | — |
| optional.scope.include_all_databases | boolean | No | Scan all non-template databases visible to this user | false | — |
| optional.scope.include_schemas | array | No | Optional schema allowlist (exact schema names) | — | — |
| optional.scope.include_schemas[] | string | No | — | — | — |
| optional.scope.include_tables | array | No | Optional table allowlist. Accepted forms: schema.table or database.schema.table | — | — |
| optional.scope.include_tables[] | string | No | — | — | — |
| optional.scope.maintenance_database | string | No | Database used for database enumeration when include_all_databases is true | postgres | — |
| optional.scope.table_limit | integer | No | Optional cap on number of table assets extracted | — | min 1 |
Examples
Reference payloads generated from shared source examples JSON.
Scan a single PostgreSQL database with random row sampling
Extract table assets from one database and sample random rows for detector content
Schedule
{
"enabled": true,
"preset": "weekday_business",
"cron": "33 14 * * 1-5",
"timezone": "UTC"
}Config Payload
{
"type": "POSTGRESQL",
"required": {
"host": "localhost",
"port": 5432
},
"masked": {
"username": "postgres",
"password": "test"
},
"optional": {
"scope": {
"database": "postgres"
}
},
"sampling": {
"strategy": "RANDOM",
"limit": 20,
"max_columns": 20,
"max_cell_chars": 512
}
}Scan all databases with latest-row sampling
Enumerate all visible databases and prioritize latest records when sampling detector payloads
Schedule
{
"enabled": true,
"preset": "nightly",
"cron": "56 0 * * *",
"timezone": "UTC"
}Config Payload
{
"type": "POSTGRESQL",
"required": {
"host": "localhost",
"port": 5432
},
"masked": {
"username": "postgres",
"password": "test"
},
"optional": {
"scope": {
"include_all_databases": true,
"maintenance_database": "app"
}
},
"sampling": {
"strategy": "LATEST",
"limit": 30,
"order_by_column": "updated_at",
"fallback_to_random": true
}
}Scan selected schemas with detector pipeline
Limit extraction scope to business schemas and run secrets + PII detectors on sampled rows
Schedule
{
"enabled": true,
"preset": "weekday_morning",
"cron": "22 7 * * 1-5",
"timezone": "UTC"
}Config Payload
{
"type": "POSTGRESQL",
"required": {
"host": "localhost",
"port": 5432
},
"masked": {
"username": "postgres",
"password": "test"
},
"optional": {
"scope": {
"database": "postgres",
"include_schemas": [
"public",
"analytics"
],
"exclude_schemas": [
"information_schema",
"pg_catalog",
"pg_toast"
]
}
},
"sampling": {
"strategy": "RANDOM",
"limit": 15,
"max_total_chars": 15000
},
"detectors": [
{
"type": "SECRETS",
"enabled": true
},
{
"type": "PII",
"enabled": true
}
]
}