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

Re: [HACKERS] [PATCHES] log_statement output for protocol

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oliver Jowett <oliver(at)opencloud(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com>, Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: 2006-08-29 20:10:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbcpgsql-patches
Guillaume Smet wrote:
> On 8/29/06, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >         DETAIL:  prepare: SELECT $1;  bind: $1 = 'a''b'
> I attached a trivial patch to add a dash between the prepare part and
> the bind part. People usually don't finish their queries with a semi
> colon so it's more readable with a separator.
> DETAIL:  prepare: SELECT $1  bind: $1 = 'a''b'
> becomes
> DETAIL:  prepare: SELECT $1 - bind: $1 = 'a''b'

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'

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'

or with no semicolon:

	LOG:  duration: 0.023 ms  execute sel1
	DETAIL:  prepare: SELECT $1,  bind: $1 = 'a''b'

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

  Bruce Momjian   bruce(at)momjian(dot)us

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /bjm/diff
Description: text/x-diff (2.7 KB)

In response to


pgsql-hackers by date

Next:From: Jaime CasanovaDate: 2006-08-29 20:35:14
Subject: Re: [COMMITTERS] pgsql: Second try committing the path changes.
Previous:From: Devrim GUNDUZDate: 2006-08-29 19:59:26
Subject: Re: [Pgsqlrpms-hackers] Safer auto-initdb for RPM init

pgsql-patches by date

Next:From: Martijn van OosterhoutDate: 2006-08-29 21:00:29
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Previous:From: Chris BrowneDate: 2006-08-29 18:46:06
Subject: Changes to epgc test

pgsql-jdbc by date

Next:From: Luis Vilar FloresDate: 2006-08-29 22:02:34
Subject: Re: outOfMemoryError
Previous:From: Dave CramerDate: 2006-08-29 16:59:59
Subject: Re: outOfMemoryError

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