patch for null table in getPrimaryKeys
This commit is contained in:
parent
ff494e8851
commit
83feff3ee7
@ -2903,9 +2903,11 @@ public abstract class AbstractJdbc1DatabaseMetaData
|
|||||||
" ci.relname AS PK_NAME "+
|
" ci.relname AS PK_NAME "+
|
||||||
from+
|
from+
|
||||||
" WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid "+
|
" WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid "+
|
||||||
" AND a.attrelid=ci.oid AND i.indisprimary "+
|
" AND a.attrelid=ci.oid AND i.indisprimary ";
|
||||||
" AND ct.relname = '"+escapeQuotes(table)+"' "+
|
if (table != null && !"".equals(table)) {
|
||||||
where+
|
sql += " AND ct.relname = '"+escapeQuotes(table)+"' ";
|
||||||
|
}
|
||||||
|
sql += where+
|
||||||
" ORDER BY table_name, pk_name, key_seq";
|
" ORDER BY table_name, pk_name, key_seq";
|
||||||
return connection.createStatement().executeQuery(sql);
|
return connection.createStatement().executeQuery(sql);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user