Re: log_statement and PREPARE
От | Tom Lane |
---|---|
Тема | Re: log_statement and PREPARE |
Дата | |
Msg-id | 6552.1189124396@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | log_statement and PREPARE (brian <brian@zijn-digital.com>) |
Ответы |
Re: log_statement and PREPARE
|
Список | pgsql-general |
brian <brian@zijn-digital.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
В списке pgsql-general по дате отправления: