Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dtp-dev] Display options when data types are unknown

On the newsgroup it was reported that data types for columns in PostgreSQL
tables are not appearing correctly in the DSE (see attached "before"
image). We've determined that, at least in this case, the value "_varchar"
is being passed back from the JDBC driver (not "varchar"), and this type
does not map to one contained in the predefined models.

Looking into the code, I find the following in
org.eclipse.datatools.connectivity.sqm.internal.core.rte.jdbc.JDBCTable#loadColumns
 [org.eclipse.datatools.connectivity.sqm.core plug-in]:

    System.out.println("Unresolved datatype: " + typeName); //$NON-NLS-1$
    Iterator it = databaseDefinition.getPredefinedDataTypes();
    while (it.hasNext()) {
          PredefinedDataTypeDefinition datatype =
(PredefinedDataTypeDefinition)it.next();
          PredefinedDataType type =
databaseDefinition.getPredefinedDataType(datatype);
          column.setContainedType(type);
          break;
    }

I'm not sure about the intention of this code. If it is commented out and
the sample table is explored in DSE, no data type is shown (see attached
"after" image). It seems to me that no data types being displayed is less
confusing than the incorrect one.

Any comments?

Regards,
John Graham
Staff Software Engineer
Sybase, Inc.

(See attached file: data_types_after.JPG)(See attached file:
data_types_before.JPG)

Attachment: data_types_after.JPG
Description: JPEG image

Attachment: data_types_before.JPG
Description: JPEG image


Back to the top