From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Bjørn T Johansen <btj(at)havleik(dot)no> |
Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Logging of sql statements? |
Date: | 2006-03-23 21:01:17 |
Message-ID: | 1143147677.17999.91.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2006-03-23 at 14:50, Bjørn T Johansen wrote:
> On Thu, 23 Mar 2006 17:21:38 +0100
> Andreas Kretschmer <akretschmer(at)spamfence(dot)net> wrote:
>
> > Bjørn T Johansen <btj(at)havleik(dot)no> schrieb:
> > > > Set in your postgresql.conf:
> > > >
> > > > log_statement = all
> > > >
> > > > Since 8.0 oder 8.1, there you can see parameters in prepared statements.
> > > >
> > > >
> > > >
> > > > HTH, Andreas
> > >
> > >
> > > This is what I am already using and it doesn't work...
> >
> > It works for me ;-)
> >
> > test=# prepare my_foo(int) as select * from foo where id = $1;
> > PREPARE
> > test=#
> > test=# execute my_foo(1);
> > id | x
> > ----+----
> > 1 | 10
> > (1 row)
> >
> >
> > In my log:
> > LOG: statement: prepare my_foo(int) as select * from foo where id = $1;
> > LOG: statement: execute my_foo(1); [client PREPARE: prepare my_foo(int) as select * from foo where id =
> > $1;]
> >
> >
> > test=# select version();
> > version
> > --------------------------------------------------------------------------------------------------------------
> > PostgreSQL 8.1.2 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3 20060104 (prerelease) (Debian
> > 4.0.2-6) (1 row)
> >
> >
> >
> > HTH, Andreas
>
> If I try the same from a client, I get the same result.. But when running from my webapp (using Hibernate),
> only question marks appear....?
Again, I'm pretty sure this is a known issue with the JDBC driver
version. If you can force your JDBC driver to run under the previous
protocol, you should get the old behaviour.
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Browne | 2006-03-23 21:03:32 | Re: Advantages of PostgreSQL over MySQL 5.0 |
Previous Message | Steve Crawford | 2006-03-23 20:50:42 | Re: version problem with pg_dump |