This patch fixes a couple of minor bugs:
1) DatabaseMetaData.getPrimaryKeys() would fail saying that there is no table t. 2) PreparedStatement.getObject() was missing some break statements, which was causing updates not to work with JBuilder (supplied by Aaron Dunlop). jdbc fixes from Peter.
This commit is contained in:
parent
55c235b266
commit
2b3bb341fe
@ -2121,7 +2121,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
||||
"ic.relname AS COLUMN_NAME," +
|
||||
"'1' as KEY_SEQ,"+ // -- fake it as a String for now
|
||||
"t.typname as PK_NAME " +
|
||||
" FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a " +
|
||||
" FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a, pg_type t " +
|
||||
" WHERE relkind = 'r' " + // -- not indices
|
||||
" and bc.relname ~ '"+table+"'" +
|
||||
" and i.indrelid = bc.oid" +
|
||||
|
@ -470,14 +470,19 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
case Types.VARCHAR:
|
||||
case Types.LONGVARCHAR:
|
||||
setString(parameterIndex, x.toString());
|
||||
break;
|
||||
case Types.DATE:
|
||||
setDate(parameterIndex, (java.sql.Date)x);
|
||||
break;
|
||||
case Types.TIME:
|
||||
setTime(parameterIndex, (Time)x);
|
||||
break;
|
||||
case Types.TIMESTAMP:
|
||||
setTimestamp(parameterIndex, (Timestamp)x);
|
||||
break;
|
||||
case Types.OTHER:
|
||||
setString(parameterIndex, ((PGobject)x).getValue());
|
||||
break;
|
||||
default:
|
||||
throw new SQLException("Unknown Types value");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user