pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Problem with creating language by JDBC
Date: Fri, 25 Jun 2010 08:40:12 +0200
Message-ID: <i01j0c$unm$1@dough.gmane.org> (raw)
In-Reply-To: <bbb0de80-cbd0-4b78-a47b-d6d7627c8f76@y4g2000yqy.googlegroups.com>
References: <37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net>
	<i00j7v$ani$1@dough.gmane.org>
	<bbb0de80-cbd0-4b78-a47b-d6d7627c8f76@y4g2000yqy.googlegroups.com>

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




  





view thread (8+ messages)  latest in thread

Message-ID: <i01j0c$unm$1@dough.gmane.org>
Permalink:  ../i01j0c$unm$1@dough.gmane.org/
Also on:    postgresql.org/message-id/i01j0c$unm$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Problem with creating language by JDBC
  In-Reply-To: <i01j0c$unm$1@dough.gmane.org>
  References: <37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net> <i00j7v$ani$1@dough.gmane.org> <bbb0de80-cbd0-4b78-a47b-d6d7627c8f76@y4g2000yqy.googlegroups.com> <i01j0c$unm$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox