Re: statement logging / extended query protocol issues

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: statement logging / extended query protocol issues
Дата
Msg-id 432AB2CC.9010307@opencloud.com
обсуждение исходный текст
Ответ на Re: statement logging / extended query protocol issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: statement logging / extended query protocol issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:

> I think it is more verbose because no FETCH is logged in this type of
> prepare/execute.  The goal, I think, is for these type of queries to
> look as similar to normal PREPARE/EXECUTE and DECLARE/FETCH as possible.

I do not understand why this is a useful thing to do as part of 
log_statement.

My point is that given JDBC code like this:
  Statement s = connection.createStatement();  ResultSet rs = s.executeQuery("SELECT * FROM pg_proc");  while
(rs.next()){     // Process results  }
 

it seems that the least surprising thing to get logged is simply "SELECT 
* FROM pg_proc".

I don't see how logging a synthetic PREPARE/EXECUTE/FETCH sequence (and 
DECLARE, now?) is useful. They're not necessarily syntactically correct, 
and they're certainly not queries that were actually sent to the 
backend. I thought log_statement was meant to answer the question "what 
queries were submitted to the backend?", rather than to provide a trace 
of protocol-level activity..

-O


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: statement logging / extended query protocol issues
Следующее
От: Adrian Maier
Дата:
Сообщение: Re: when started century? PostgreSQL vs Oracle diff