JDBC support for DROP USER? - Mailing list pgsql-interfaces

From Dnesbitt@encryptix.com
Subject JDBC support for DROP USER?
Date
Msg-id 19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com
Whole thread Raw
List 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
(Exceptione) {        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;     }  }
 
}



pgsql-interfaces by date:

Previous
From: Peter Mount
Date:
Subject: Re: unreasonably slooooow query on small table from JDBC & Zeos
Next
From: Joseph Shraibman
Date:
Subject: [Fwd: 2 computers 1hd 2 postgres daemons. Is it possible?]