Re: Patch to implement pg_current_logfile() function
От | Gilles Darold |
---|---|
Тема | Re: Patch to implement pg_current_logfile() function |
Дата | |
Msg-id | 687ab3a1-ee7e-3bf4-4f3d-055b6b005919@dalibo.com обсуждение исходный текст |
Ответ на | Re: Patch to implement pg_current_logfile() function ("Karl O. Pinc" <kop@meme.com>) |
Список | pgsql-hackers |
Le 28/11/2016 à 18:54, Karl O. Pinc a écrit : > Hi Gilles, > > On Sun, 27 Nov 2016 21:54:46 +0100 > Gilles Darold <gilles.darold@dalibo.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. Right > 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. Sorry, Isee that I forgot to apply the control in number of character read by sscanf. The problem about white space make me though that the use of sscanf is not the right solution, I will rewrite this part but I can not do that before the end of the week. -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org
В списке pgsql-hackers по дате отправления: