Re: FW: REVIEW: Allow formatting in log_line_prefix - Mailing list pgsql-hackers

From Robert Haas
Subject Re: FW: REVIEW: Allow formatting in log_line_prefix
Date
Msg-id CA+Tgmob_7PgktFpj=1et2dTUz+q_BKA89O=2=YSgj6A4aLT3gQ@mail.gmail.com
Whole thread Raw
In response to Re: FW: REVIEW: Allow formatting in log_line_prefix  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Responses Re: FW: REVIEW: Allow formatting in log_line_prefix
List pgsql-hackers
On Fri, Sep 20, 2013 at 3:15 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
> David Rowley wrote:
>> I moved the source around and I've patched against it again. New patch attached.
>
> Thank you, marked as ready for committer.
/*
+ * helper function for processing the format string in
+ * log_line_prefix()
+ * This function returns NULL if it finds something which
+ * it deems invalid for the log_line_prefix string.
+ */

Comments should be formatted as a single paragraph.  If you want
multiple paragraphs, you need to include a line that's blank except
for the leading " *".

+static const char
+*process_log_prefix_padding(const char *p, int *ppadding)

The asterisk should be on the previous line, separated from "char" by a space.

+                               appendStringInfo(buf, "%*ld", padding,
log_line_number);

Is %* supported by all versions of printf() on every platform we support?

Earlier there was some discussion of performance.  Was that tested?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Could ANALYZE estimate bloat?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Could ANALYZE estimate bloat?