Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 009726322D5 for ; Thu, 24 Jun 2010 18:38:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 26230-10 for ; Thu, 24 Jun 2010 21:38:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id D41EA632277 for ; Thu, 24 Jun 2010 18:38:21 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ORu7k-0002pj-JS for pgsql-jdbc@postgresql.org; Thu, 24 Jun 2010 23:38:16 +0200 Received: from ppp-188-174-94-250.dynamic.mnet-online.de ([188.174.94.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Jun 2010 23:38:16 +0200 Received: from spam_eater by ppp-188-174-94-250.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Jun 2010 23:38:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Problem with creating language by JDBC Date: Thu, 24 Jun 2010 23:38:10 +0200 Lines: 21 Message-ID: References: <37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp-188-174-94-250.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/71 X-Sequence-Number: 20641 Ming Deng wrote on 24.06.2010 19:44: > Hi there, > > I was trying to create language by execute() or executeUpdate(). But the > call always fails with message as > > problem running SQL query: CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' > HANDLER plpgsql_call_handler > .An I/O error occured while sending to the backend. > > Following is a snippet of the Java code I have, which works with > creating database, executing other queries: > Did you try to use a regular statement, instead of a PreparedStatement? Statement stmt = con.createStatement() stmt.executeUpdate("CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler"); Thomas