From: Dnesbitt@encryptix.com
To: pgsql-interfaces@postgresql.org
Cc: Dnesbitt@encryptix.com
Cc: tlam@encryptix.com
Subject: JDBC support for DROP USER?
Date: Tue, 17 Oct 2000 11:15:02 -0700
Message-ID: <19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com> (raw)
Good People,
We are getting an exception when trying to drop a user with a JDBC
PreparedStatement. Is this supported? Here is the response we are seeing:
java TestPrepare
error : ERROR: parser: parse error at or near "'"
Thanks in advance for any insight. The sample source code follows.
Best Regards,
//Dave
import java.sql.*;
public class TestPrepare {
public static void main(String[] args) {
try {
Class.forName("org.postgresql.Driver");
} catch (Exception e) {
System.out.println("load driver fails");
return;
}
try {
Connection con =
DriverManager.getConnection("jdbc:postgresql://<host>/<db>",
"<user>",
"<password>");
String dropUserSQL = "drop user ?";
PreparedStatement dropUserPs = con.prepareStatement(dropUserSQL);
String userName = "tester";
dropUserPs.setString(1, userName);
dropUserPs.executeUpdate();
} catch (SQLException e) {
System.out.println("error : " + e.getMessage());
return;
}
}
}
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-interfaces@postgresql.org
Cc: Dnesbitt@encryptix.com, tlam@encryptix.com
Subject: Re: JDBC support for DROP USER?
In-Reply-To: <19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com>
References: <19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com>
* 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