From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, depesz <depesz(at)depesz(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] BUG #3799: csvlog skips some logs |
Date: | 2007-12-10 15:14:55 |
Message-ID: | 20071210151455.GF8036@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
> > 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 certainly come into that category.
>
> Huh, sorry, that's a leftover comment. The inserted string is quoted
> inside appendCSVLiteral. Thanks, I'll fix it.
This part now looks like this (it was a bit duplicative):
/* file error location */
if (Log_error_verbosity >= PGERROR_VERBOSE)
{
StringInfoData msgbuf;
initStringInfo(&msgbuf);
if (edata->funcname && edata->filename)
appendStringInfo(&msgbuf, "%s, %s:%d",
edata->funcname, edata->filename,
edata->lineno);
else if (edata->filename)
appendStringInfo(&msgbuf, "%s:%d",
edata->filename, edata->lineno);
appendCSVLiteral(&buf, msgbuf.data);
pfree(msgbuf.data);
}
--
Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC
<Schwern> It does it in a really, really complicated way
<crab> why does it need to be complicated?
<Schwern> Because it's MakeMaker.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-12-10 15:19:47 | Re: [HACKERS] BUG #3799: csvlog skips some logs |
Previous Message | Alvaro Herrera | 2007-12-10 15:11:44 | Re: [HACKERS] BUG #3799: csvlog skips some logs |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-12-10 15:16:16 | Re: whats the deal with -u ? |
Previous Message | Alvaro Herrera | 2007-12-10 15:11:44 | Re: [HACKERS] BUG #3799: csvlog skips some logs |