Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 28643632304 for ; Fri, 25 Jun 2010 03:40:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 79288-10 for ; Fri, 25 Jun 2010 06:40:23 +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 E869B632277 for ; Fri, 25 Jun 2010 03:40:23 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OS2aJ-0002Y7-5R for pgsql-jdbc@postgresql.org; Fri, 25 Jun 2010 08:40:19 +0200 Received: from 217.110.94.67 ([217.110.94.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Jun 2010 08:40:19 +0200 Received: from spam_eater by 217.110.94.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Jun 2010 08:40:19 +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: Fri, 25 Jun 2010 08:40:12 +0200 Lines: 34 Message-ID: References: <37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 217.110.94.67 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.153 tagged_above=-10 required=5 tests=BAYES_20=-0.001, RCVD_NUMERIC_HELO=1.164, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: * X-Archive-Number: 201006/73 X-Sequence-Number: 20643 MD, 25.06.2010 05:10: >>> 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? >> > > I just tried with the regular statement, got the same failure. That's strange, the following works fine for me: Class.forName("org.postgresql.Driver"); con = DriverManager.getConnection("jdbc:postgresql://localhost/postgres", "postgres", "postgres"); stmt = con.createStatement(); stmt.executeUpdate("CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler"); I think it is not related to the way you run this from Java, but something else, and the "I/O error" seems to indicate that. Regards Thomas