Get PG 19 DDL status
get_pg19_ddl_statusDetermines whether PG19's pg_get_roledef/pg_get_databasedef/pg_get_tablespacedef DDL-dump functions are usable on the server. Reports availability or fallback guidance for older versions.
Instructions
Report whether PG 19's pg_get_roledef() / pg_get_databasedef() / pg_get_tablespacedef() DDL-dump functions are usable on this server. Never raises — driver-level errors surface as available=false. On PG ≤ 18 reports available=false and points the agent at pg_dumpall --roles-only / --globals-only / --tablespaces-only as the fallback. Returns an object with available (bool), server_version_num (int), server_version, has_pg_get_roledef (bool), has_pg_get_databasedef (bool), has_pg_get_tablespacedef (bool), and detail (guidance string).
Example: get_pg19_ddl_status()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| available | Yes | ||
| server_version | Yes | ||
| has_pg_get_roledef | Yes | ||
| server_version_num | Yes | ||
| has_pg_get_databasedef | Yes | ||
| has_pg_get_tablespacedef | Yes |