Re: Logging SQL queries?
От | Ralph Graulich |
---|---|
Тема | Re: Logging SQL queries? |
Дата | |
Msg-id | Pine.LNX.4.21.0207190042140.11568-100000@shauny.shauny.de обсуждение исходный текст |
Ответ на | Re: Logging SQL queries? (Kevin Brannen <kevinb@nurseamerica.net>) |
Список | pgsql-general |
Hi, just my two cents worth tho. I'd love having some kind of "internal log facility", which means being able to do the follwing: a) using log functions in every place where common SQL is allowed, which counts for - selects, updates, inserts, deletes (in transaction blocks) - triggers - functions b) setting a log level c) setting which log levels (and greater) really get logged For example: CREATE FUNCTION foobar RETURNS INTEGER AS ' DECLARE ... BEGIN ... IF ... LOG('executing if-branch in foobar for value = ' || someval, 2); END IF; ... ... END; ' LANGUAGE 'plpgsql'; So within any application or psql session one can decide what gets logged by using: SET LOGLEVEL TO 1; which means logging all messages with a level of 1 or higher. Just a proposal for future enhancement probably. Open for any comments, requests... what do others think about that debugging possibility? Kind regards ... Ralph ...
В списке pgsql-general по дате отправления: