Re: [HACKERS] Patch to implement pg_current_logfile() function

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Re: [HACKERS] Patch to implement pg_current_logfile() function
Дата
Msg-id 20170115221451.12927124@slate.meme.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch to implement pg_current_logfile() function  ("Karl O. Pinc" <kop@meme.com>)
Ответы Re: [HACKERS] Patch to implement pg_current_logfile() function  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Sun, 15 Jan 2017 07:20:40 -0600
"Karl O. Pinc" <kop@meme.com> wrote:

> On Sun, 15 Jan 2017 14:54:44 +0900
> Michael Paquier <michael.paquier@gmail.com> wrote:
> 
> > I think that's all I have for this patch.  

> I'd like to submit with it an addendum patch that
> makes symbols out of some constants.  I'll see if I can
> get that done soon.

Attached is a version 23 of the patch.  The only change
is follow-through and cleanup of code posted in-line in emails.

  src/backend/utils/adt/misc.c | 13 ++++++-------
  1 file changed, 6 insertions(+), 7 deletions(-)

This includes making comments into full sentences.


I do have a question here regards code formatting.
The patch now contains:

    if (log_filepath == NULL)
    {
        /* Bad data. Avoid segfaults etc. and return NULL to caller. */
        break;
    }

I'm not sure how this fits in with PG coding style,
whether the {} should be removed or what.  I've looked
around and can't find an example of an if with a single
line then block and a comment.  Maybe this means that
I shouldn't be doing this, but if I put the comment above
the if then it will "run into" the comment block which
immediately precedes the above code which describes
a larger body of code.  So perhaps someone should look
at this and tell me how to improve it.


Attached also are 2 patches which abstract some hardcoded
constants into symbols.  Whether to apply them is a matter
of style and left to the maintainers, which is why these
are separate patches.  

The first patch changes only code on the master
branch, the 2nd patch changes the new code.


I have not looked further at the patch or checked
to see that all changes previously recommended have been
made.  Michael, if you're confident that everything is good
go ahead and move the patchs forward to the maintainers.  Otherwise
please let me know and I'll see about finding time
for further review.

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (wasChanged SRF in targetlist handling)
Следующее
От: Amit Khandekar
Дата:
Сообщение: Re: [HACKERS] Parallel Append implementation