Re: get the query created by PreparedStatement

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: get the query created by PreparedStatement
Дата
Msg-id 985099037.3ab76b1dd46d0@webmail.retep.org.uk
обсуждение исходный текст
Ответ на Re: get the query created by PreparedStatement  (Garry Thuna <garry.thuna-pgsql-jdbc@tacticalExecutive.com>)
Список pgsql-jdbc
Quoting Garry Thuna <garry.thuna-pgsql-jdbc@tacticalExecutive.com>:

> Eric,
>
> I have always wanted the same thing for both debugging as well as
> logging.

How about the toString() method ;-)

Ok, may not be standard JDBC, but:

PreparedStatement ps = ....;

// later
org.postgresql.jdbc2.PreparedStatement ps2 =
      (org.postgresql.jdbc2.PreparedStatement) ps;
System.out.println(ps2.toString());

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Garry Thuna
Дата:
Сообщение: Re: get the query created by PreparedStatement
Следующее
От: Julian Richardson
Дата:
Сообщение: pg703: support for Large objects via JDBC PreparedStatement.setBi naryStream()