log_statement
Controls which SQL statements are logged. Valid values are none (off), ddl, mod, and all (all statements). ddl logs all data definition statements, such as CREATE, ALTER, and DROP statements. mod logs all ddl statements, plus data-modifying statements such as INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM. PREPARE, EXECUTE, and EXPLAIN ANALYZE statements are also logged if their contained command is of an appropriate type. For clients using extended query protocol, logging occurs when an Execute message is received, and values of the Bind parameters are included (with any embedded single-quote marks doubled). The default is none. Only superusers and users with the appropriate SET privilege can change this setting. Note Statements that contain simple syntax errors are not logged even by the log_statement = all setting, because the log message is emitted only after basic parsing has been done to determine the statement type. In the case of extended query protocol, this setting likewise does not log statements that fail before the Execute phase (i.e., during parse analysis or planning). Set log_min_error_statement to ERROR (or lower) to log such statements. Logged statements might reveal sensitive data and even contain plaintext passwords.
英文手册覆盖始于 PostgreSQL 7.4. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
此版本暂无所选语言的定义,以下显示原始英文内容。
- boot val
- none
- category
- Reporting and Logging / What to Log
- context
- superuser
- documented
- true
- enumvals
- none, ddl, mod, all
- extra desc
- 未知
- lang
- en
- max val
- 未知
- metadata version
- 18
- min val
- 未知
- name
- log_statement
- short desc
- Sets the type of statements logged.
- source
- pg-settings-source-snapshot
- unit
- 未知
- vartype
- enum
版本定义 PG 18
Controls which SQL statements are logged. Valid values are none (off), ddl, mod, and all (all statements). ddl logs all data definition statements, such as CREATE, ALTER, and DROP statements. mod logs all ddl statements, plus data-modifying statements such as INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM. PREPARE, EXECUTE, and EXPLAIN ANALYZE statements are also logged if their contained command is of an appropriate type. For clients using extended query protocol, logging occurs when an Execute message is received, and values of the Bind parameters are included (with any embedded single-quote marks doubled). The default is none. Only superusers and users with the appropriate SET privilege can change this setting. Note Statements that contain simple syntax errors are not logged even by the log_statement = all setting, because the log message is emitted only after basic parsing has been done to determine the statement type. In the case of extended query protocol, this setting likewise does not log statements that fail before the Execute phase (i.e., during parse analysis or planning). Set log_min_error_statement to ERROR (or lower) to log such statements. Logged statements might reveal sensitive data and even contain plaintext passwords.
比较版本
来源引用
定义来源
center · PostgreSQL 18 · english-manuals:e508595a6e8a9fa5632925c1b0f3fba27530ba318837253996624a821c6b5d09
正文语言: en · english-manuals:e508595a6e8a9fa5632925c1b0f3fba27530ba318837253996624a821c6b5d09