From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> |
Cc: | Christoph Berg <myon(at)debian(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to implement pg_current_logfile() function |
Date: | 2016-11-28 17:54:20 |
Message-ID: | 20161128115420.7fb134b9@slate.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Gilles,
On Sun, 27 Nov 2016 21:54:46 +0100
Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> wrote:
> I've attached the v15 of the patch that applies your changes/fixes and
> remove the call to strtok().
I like the idea of replacing the strtok() call with sscanf()
but I see problems.
It won't work if log_filename begins with a space because
(the docs say) that a space in the sscanf() format represents
any amount of whitespace.
As written, there's a potential buffer overrun in log_format.
You could fix this by making log_format as large as lbuffer,
but this seems clunky.
Regards,
Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Christian Convey | 2016-11-28 17:57:50 | Re: Tackling JsonPath support |
Previous Message | Christian Convey | 2016-11-28 17:52:09 | Re: Tackling JsonPath support |