Problem with creating language by JDBC
От | Ming Deng |
---|---|
Тема | Problem with creating language by JDBC |
Дата | |
Msg-id | 37335766762332458F9F59CD831915BC04F2FAAA@XCH28YOW.rim.net обсуждение исходный текст |
Ответы |
Re: Problem with creating language by JDBC
|
Список | pgsql-jdbc |
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: PreparedStatement stmt = null; ResultSet rs = null; try { stmt = con.prepareStatement(str); System.out.println("Running SQL query: " + str + ".."); try { //stmt.executeUpdate(); stmt.execute(); } catch (SQLException sqle) { StringBuffer errMsg = new StringBuffer( " problem running SQL query: " + str + "."); errMsg.append(sqle.getMessage()); System.err.println(errMsg.toString()); ret = false; } con.commit(); System.out.println("Query is done."); } finally { I'm using postgresql-8.2dev-501.jdbc3.jar and querying against an 8.3.4 server. If I run the query manually on psql command with same authentication, it will return successfully. I tried with a later JDBC driver, it has the same problem. Regards, M. --------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including materialprotected by the solicitor-client or other applicable privileges), or constitute non-public information. Any useof this information by anyone other than the intended recipient is prohibited. If you have received this transmissionin error, please immediately reply to the sender and delete this information from your system. Use, dissemination,distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
В списке pgsql-jdbc по дате отправления: