From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: %d in log_line_prefix doesn't work for bg/autovacuum workers |
Date: | 2014-05-16 18:06:36 |
Message-ID: | 20140516180636.GP23662@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-05-16 14:02:44 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > elog.c's log_line_prefix() processes %d with:
> > case 'd':
> > if (MyProcPort)
> > {
> > const char *dbname = MyProcPort->database_name;
>
> > if (dbname == NULL || *dbname == '\0')
> > dbname = _("[unknown]");
> > if (padding != 0)
> > appendStringInfo(buf, "%*s", padding, dbname);
>
> Not directly related to your gripe, but: where did this "padding" logic
> come from, and what prevents it from creating invalidly-encoded output by
> means of truncating multibyte characters in the middle?
Isn't that syntax just the *minimal* width?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-05-16 18:07:47 | Re: chr() is still too loose about UTF8 code points |
Previous Message | Tom Lane | 2014-05-16 18:02:44 | Re: %d in log_line_prefix doesn't work for bg/autovacuum workers |