Skip site navigation (1) Skip section navigation (2)

Re: Problem with creating language by JDBC

From: MD <mingdeng2004(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with creating language by JDBC
Date: 2010-06-25 14:00:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
On Jun 25, 2:40 am, spam_ea(dot)(dot)(dot)(at)gmx(dot)net (Thomas Kellerer) wrote:
> 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

Hi Thomas,

Thanks for your investigation. What are the version of Postgres and
JDBC you are using?

In response to


pgsql-jdbc by date

Next:From: Thomas KellererDate: 2010-06-25 15:14:10
Subject: Re: Problem with creating language by JDBC
Previous:From: Thomas KellererDate: 2010-06-25 06:40:12
Subject: Re: Problem with creating language by JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group