Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] BUG #3799: csvlog skips some logs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, depesz <depesz(at)depesz(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Date: 2007-12-10 23:21:49
Message-ID: 21540.1197328909@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Another change I did was to change a "%.*s" to "%*s".  The "precision"
> marker seems useless AFAICT.

This is wrong, broken, will cause crashes on platforms where the PS
string is not null-terminated.  (Hint: .* is a maximum width, * is a
minimum width.)

Another thing I thought strange was the order of the added columns;
why isn't it more like the order in which they appear in the text
version?  In particular hint should probably come just after detail
and before context, and internal-query should also come before context
because when relevant it's usually more closely nested than the context
stack.

Otherwise the patch looks pretty sane to me.  I didn't do any testing
though.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew ChernowDate: 2007-12-10 23:23:53
Subject: PGparam proposal
Previous:From: Erik JonesDate: 2007-12-10 23:11:52
Subject: Re: partitioned table query question

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2007-12-11 13:46:16
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Previous:From: A. Ozen AkyurekDate: 2007-12-10 20:30:21
Subject: BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group