pg_log
displays log content from SQL
pg_log · displays log content from SQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101574 | pg_log | pg_log | 1.0.0 | STAT | PostgreSQL | PLpgSQL |
Usage
Sources:
- Official upstream README
- Official extension control file (pg_log.control)
- Official extension SQL (pg_log–0.0.1.sql)
pg_log — PostgreSQL extension to display log from SQL. Use it when collecting or interpreting the corresponding PostgreSQL statistics. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
pg_get_logname()is an extension function and returnscstring.pg_log(OUT line integer, OUT message text)is an extension function and returnsSETOF.pg_log_refresh()is an extension function and returnsvoid.pg_read(cstring)is an extension function and returnsvoid.logis an extension-defined view.pglogis a table installed or managed by the extension.
Requirements and Caveats
- The catalog records version
1.0.0, while the reviewed control file declares default version0.0.1. - The control file marks the extension as non-relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.