Search Postgresql Archives

Re: log_statement and PREPARE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



brian <brian@xxxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux