JDBC support for DROP USER?

From: Dnesbitt(at)encryptix(dot)com
To: pgsql-interfaces(at)postgresql(dot)org
Cc: Dnesbitt(at)encryptix(dot)com, tlam(at)encryptix(dot)com
Subject: JDBC support for DROP USER?
Date: 2000-10-17 18:15:02
Message-ID: 19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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;
}
}
}

Browse pgsql-interfaces by date

  From Date Subject
Next Message Joseph Shraibman 2000-10-17 18:53:56 [Fwd: 2 computers 1hd 2 postgres daemons. Is it possible?]
Previous Message Oscar Serrano 2000-10-17 17:20:29 RE: 2 computers 1hd 2 postgres daemons. Is it possible?