Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A89F8633F0C for ; Sun, 23 Aug 2009 13:31:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 14093-07 for ; Sun, 23 Aug 2009 16:31:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fmmailgate09.web.de (fmmailgate09.web.de [217.72.192.184]) by mail.postgresql.org (Postfix) with ESMTP id EAA9C6328EB for ; Sun, 23 Aug 2009 13:31:15 -0300 (ADT) Received: from web.de by fmmailgate09.web.de (Postfix) with SMTP id 1B0572B1BF69 for ; Sun, 23 Aug 2009 18:31:13 +0200 (CEST) Received: from [84.132.58.191] by freemailng1605.web.de with HTTP; Sun, 23 Aug 2009 18:31:12 +0200 Date: Sun, 23 Aug 2009 18:31:12 +0200 Message-Id: <880308007@web.de> MIME-Version: 1.0 From: "J. W. Ulbts" To: pgsql-jdbc@postgresql.org Subject: Re: Display SQL from Java Prepared Statement Precedence: fm-user Organization: http://freemail.web.de/ X-Provags-Id: V01U2FsdGVkX1+QHZCglFKy7WGj4ZVEUV1ESI7d9hFioTK4XO0fN5agmj/NY rdZO+sKYjnr4wQF10LNkn6bXabB301uF5Bvchn08Z4SvzmHXL0= Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.397 tagged_above=-10 required=5 tests=BAYES_50=0.001, MIME_QP_LONG_LINE=1.396 X-Spam-Level: * X-Archive-Number: 200908/53 X-Sequence-Number: 19902 Hi Lance! >Is there a way I can have the JDBC driver dump out to a log file all=20 > of the SQL statements executed=3F I am using prepared statements. > Note: I think the development team is doing a great job. > Thanks, > Lance Campbell Just call the toString() method of the prepared statement object. That wil= l print the prepared statements SQL. It includes not just the SQL command = but also some additional text before the SQL command. I'm using it also to write statements to the log. Kind regards, J. Ulbts =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F GRATIS f=FCr alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de