JDBC support for DROP USER?

Поиск
Список
Период
Сортировка
От Dnesbitt@encryptix.com
Тема JDBC support for DROP USER?
Дата
Msg-id 19016070071ED411B61300508BAC4B75041ACF@exch1etix.encryptix.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Peter Mount
Дата:
Сообщение: Re: unreasonably slooooow query on small table from JDBC & Zeos
Следующее
От: Joseph Shraibman
Дата:
Сообщение: [Fwd: 2 computers 1hd 2 postgres daemons. Is it possible?]