Re: [BUGS] BUG #3799: csvlog skips some logs
От | Andrew Dunstan |
---|---|
Тема | Re: [BUGS] BUG #3799: csvlog skips some logs |
Дата | |
Msg-id | 475D558E.2060808@dunslane.net обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #3799: csvlog skips some logs (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: [BUGS] BUG #3799: csvlog skips some logs
Re: [BUGS] BUG #3799: csvlog skips some logs |
Список | pgsql-hackers |
Alvaro Herrera wrote: > Tom Lane wrote: > >> Andrew Dunstan <andrew@dunslane.net> writes: >> >>> Tom Lane wrote: >>> >>>> Well, if we want to cram all that stuff in there, how shall we do it? >>>> It seems wrong to put all those lines into one text field, but I'm >>>> not sure I want to add six more text fields to the CSV format >>>> either. Thoughts? >>>> >>> Really? Six? In any case, would that be so bad? It would mean six extra >>> commas per line in the log file, and nothing much in the log table >>> unless there were content in those fields. >>> >> Yeah --- the lines output in the plain-stderr case that are not covered >> in the other are >> >> DETAIL >> HINT >> QUERY (this is an internally-generated query that failed) >> CONTEXT (think "stack trace") >> LOCATION (reference to code file/line reporting the error) >> STATEMENT (user query that led to the error) >> > > Here is a patch to do this. It emits all of these as separate columns, > which are output empty if they are not present. Of course, the commas > are emitted all the time. > Thanks. I will look at it in detail later today. Not sure I understand what this comment I noticed on a very brief glance is about: /* assume no newlines in funcname or filename... */ If it's about what to quote, we need to quote anything that might contain a newline, quote or comma. Filenames certainlycome into that category. cheers andrew
В списке pgsql-hackers по дате отправления: