Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Allow to configure log_statement for a role. #132

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

FourSigma
Copy link

@FourSigma FourSigma commented Apr 28, 2020

Adds log_statement option to role resource.

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 can change this setting.

https://www.postgresql.org/docs/current/runtime-config-logging.html

@ghost ghost added the size/S label Apr 28, 2020
Siva Manivannan added 2 commits April 28, 2020 13:00
@ghost ghost added the documentation label Apr 28, 2020
@FourSigma FourSigma changed the title [WIP] log_statement level added to role Allow to configure log_statement for a role. Apr 28, 2020
@cyrilgdn
Copy link
Contributor

cyrilgdn commented Jul 3, 2020

Hi @FourSigma ,

Thanks for opening this PR and sorry for the delay!

As I said in #150 I just need to think a bit if we can define parameters with a map instead of implementing parameter one by one.
I'll try to come back to you quickly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants