Skip to content

Commit

Permalink
TEIID-5488 correcting the reporting of an array type
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Sep 28, 2018
1 parent 893f868 commit 0c06cdd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ else if (sql.equals("SELECT typinput='array_in'::regproc, typtype FROM pg_catalo
}
//we don't support generate_series or the natural join syntax
if (modified.equals(TYPE_QUERY)) {
return "select typname like '_%', typname from pg_catalog.pg_type where typname = $1"; //$NON-NLS-1$
return "select typname like '\\_%' escape '\\', typname from pg_catalog.pg_type where typname = $1"; //$NON-NLS-1$
}
//we don't support _pg_expandarray and referencing elements by name
if (modified.startsWith(PK_QUERY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ private void connect(String database) throws SQLException {
rs.next();
ResultSetMetaData rsmd = rs.getMetaData();
assertEquals("geometry", rsmd.getColumnTypeName(1));
assertEquals("java.lang.Object", rsmd.getColumnClassName(1));
assertEquals("00200000030000000000000001000000054044000000000000000000000000000040490000000000004049000000000000000000000000000040490000000000000000000000000000000000000000000040440000000000000000000000000000", rs.getString(1));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ indkey
1
Row Count : 57
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
indkey 2003 java.sql.Array indkey int2vector pg_index 2147483647 2147483647 0 false true false false 1 false true false true
indkey 1111 java.lang.Object indkey int2vector pg_index 2147483647 2147483647 0 false true false false 1 false true false true
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ proname 12 java.lang.String proname
proretset -7 java.lang.Boolean proretset bool pg_proc 1 1 0 false false false false 1 false true false true
prorettype 4 java.lang.Integer prorettype int4 pg_proc 11 10 0 false false false false 1 false true true true
pronargs 5 java.lang.Integer pronargs int2 pg_proc 6 5 0 false false false false 1 false true true true
proargtypes 2003 java.sql.Array proargtypes oidvector pg_proc 10 10 0 false false false false 1 false true false true
proargtypes 1111 java.lang.Object proargtypes oidvector pg_proc 10 10 0 false false false false 1 false true false true
proargnames 2003 java.sql.Array proargnames _text pg_proc 2147483647 2147483647 0 false true false false 1 false true false true
proargmodes 2003 java.sql.Array proargmodes _char pg_proc 1 1 0 false true false false 1 false true false true
proallargtypes 2003 java.sql.Array proallargtypes _oid pg_proc 10 10 0 false false false false 1 false true false true
Expand Down

0 comments on commit 0c06cdd

Please sign in to comment.