From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | brian <brian(at)zijn-digital(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: log_statement and PREPARE |
Date: | 2007-09-07 00:19:56 |
Message-ID: | 6552.1189124396@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
brian <brian(at)zijn-digital(dot)com> writes:
> The docs (8.1) say the following about log_statement:
> -- snip --
> ... mod logs all ddl statements, plus INSERT, UPDATE, DELETE, TRUNCATE,
> and COPY FROM. PREPARE and EXPLAIN ANALYZE statements are also logged if
> their contained command is of an appropriate type.
> -- snip --
> Can someone please expain the meaning of, "if their contained command is
> of an appropriate type"? I take it to mean that the prepared statement
> will be logged if the it contains an INSERT (if 'mod' was chosen, of
> course).
I think you mis-parsed it. The sentence about PREPARE et al is an
independent sentence applying to all the possible values of
log_statement. That is, these commands will be logged if the contained
command is one that would have been logged, at the current log level.
> I ask because i've set log_statement to 'mod' but am not seeing any of
> my prepared statements in the log. INSERT, UPDATE, and friends i do see.
Ah. Probably you are confusing PREPARE-the-SQL-command, which is what
this is speaking of, with the protocol-level prepared-statement
functionality. 8.1 is pretty bad about logging extended-query-protocol
operations. If you can update to 8.2 you'll be happier.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | brian | 2007-09-07 00:35:16 | Re: log_statement and PREPARE |
Previous Message | Gregory Stark | 2007-09-06 23:33:03 | Re: Do AGGREGATES consistently use sort order? |