Re: DatabaseMetaData.getTablePrivileges()
От | Kris Jurka |
---|---|
Тема | Re: DatabaseMetaData.getTablePrivileges() |
Дата | |
Msg-id | alpine.BSO.2.00.1010090221170.10120@leary.csoft.net обсуждение исходный текст |
Ответ на | DatabaseMetaData.getTablePrivileges() (danap <danap@ttc-cmc.net>) |
Ответы |
Re: DatabaseMetaData.getTablePrivileges()
|
Список | pgsql-jdbc |
On Thu, 7 Oct 2010, danap wrote: > Today I update the one of the development systems for the MyJSQLView > project to test the PostgreSQL 9.0 database. Once the database was > installed and also the latest JDBC 9.0-801 I tested the program. The > application crashed and after some testing I attributed the exception to > the empty string "" parameter for the schemaPattern argument in > DatabaseMetaData.getTablePrivileges() for the JDBC. > > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(Unknown Source) > at > org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.addACLPrivileges(AbstractJdbc2DatabaseMetaData.java:2799) > at > org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.parseACL(AbstractJdbc2DatabaseMetaData.java:2878) > at > org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getTablePrivileges(AbstractJdbc2DatabaseMetaData.java:2700) > at This error has nothing to do with using "" as a schema pattern. The problem is that the server is supplying an ACL that the JDBC driver is failing to parse correctly. So if these are the same databases, something has changed in the 9.0 representation of privileges. I'm not sure what that change might be. I've built a driver with the attached patch to show the failing ACL. If you can provide the output on the failure, we can likely fix it with little trouble. http://ejurka.com/pgsql/jars/acl/ Kris Jurka
Вложения
В списке pgsql-jdbc по дате отправления: