Re: [HACKERS] log_statement output for protocol - Mailing list pgsql-patches

From Guillaume Smet
Subject Re: [HACKERS] log_statement output for protocol
Date
Msg-id 1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] log_statement output for protocol  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [HACKERS] log_statement output for protocol
List pgsql-patches
On 8/29/06, Bruce Momjian <bruce@momjian.us> wrote:
> Good point.  I thought it was clear enough, but obviously not.  I had a
> similar case with bind, and used a comma to separate them:
>
>         LOG:  statement: prepare sel1, SELECT $1;
>         LOG:  statement: bind sel1, $1 = 'a''b'

For this one, I must admit I prefer the colon we used before.
Something like:
LOG:  statement: prepare sel1: SELECT $1;
LOG:  statement: bind sel1: $1 = 'a''b'
seems better to me as after the colon, we have the details of the
command which is the common sense of a colon.

> I am concerned a dash isn't clear enough, and a semicolon is confusing.
> Using a comma the new output is:
>
>         LOG:  duration: 0.023 ms  execute sel1
>         DETAIL:  prepare: SELECT $1;,  bind: $1 = 'a''b'

A dash is clearer in this case IMHO. ;, is not very readable. But I
can parse easily both forms so it's not a problem for me if you prefer
a comma.

> Is that OK?  Patch attached and committed.  I also fixed the null bind
> parameter bug.  It now displays $1 = NULL (no quotes used).

Cool. I'll test that.

> Other suggestions?

I'll compile this new version and make tests in the next few days to
check everything is consistent and let you know.

I'm still struggling to find a regexp good enough to parse "statement:
execute y ('a', 4, 'text, with a comma'::text);" :).

Thanks a lot for your work on this subject. It will help us a lot when
we use the JDBC driver.

--
Guillaume

pgsql-patches by date:

Previous
From: Böszörményi Zoltán
Date:
Subject: Re: [HACKERS] Performance testing of COPY (SELECT) TO
Next
From: Bernd Helmle
Date:
Subject: Re: Updatable views