pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Smet <guillaume.smet@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Csaba Nagy <nagy@ecircle-ag.com>
Cc: Postgres JDBC <pgsql-jdbc@postgresql.org>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: Wed, 30 Aug 2006 09:25:34 +0200
Message-ID: <1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com> (raw)
In-Reply-To: <200608292010.k7TKAC204184@momjian.us>
References: <1d4e0c10608290454r49ad4efel63f2c4062c13438f@mail.gmail.com>
	<200608292010.k7TKAC204184@momjian.us>

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



view thread (21+ messages)  latest in thread

Message-ID: <1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com>
Permalink:  ../1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com/
Also on:    postgresql.org/message-id/1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: guillaume.smet@gmail.com, bruce@momjian.us, tgl@sss.pgh.pa.us, oliver@opencloud.com, pg@fastcrypt.com, nagy@ecircle-ag.com, pgsql-patches@postgresql.org
  Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
  In-Reply-To: <1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com>
  References: <1d4e0c10608290454r49ad4efel63f2c4062c13438f@mail.gmail.com> <200608292010.k7TKAC204184@momjian.us> <1d4e0c10608300025s2880837bi6fe3e7566b14edde@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox