Re: sql type reported for enum - Mailing list pgsql-jdbc

From dmp
Subject Re: sql type reported for enum
Date
Msg-id 55D521F0.60503@ttc-cmc.net
Whole thread Raw
In response to Re: sql type reported for enum  (rcohen@e1b.org)
Responses Re: sql type reported for enum
List pgsql-jdbc
rcohen@e1b.org wrote:
> It breaks the jdbc meta-data; that is for an enum column
>
>          columnsResultSet./getInt/("DATA_TYPE")
>
> now returns Types.VARCHAR.
>
> This breaks some of my code;  it also breaks DBUnit's support for postgres.  Now
> I can code around this, but should the metadata be reporting that an enum column
> is of  type Types.VARCHAR? This seems like incorrect behavior.
>
> Yes, enums should probably be avoided, but that isn't an option for me
> right now.
>
> Ross

Seems an Enum is only a set of characters and the MySQL database does define it
as such. So how does DBUnit handle that databases enum types?


Name        Class            Type    Type Name
enum_type    java.lang.String    1    CHAR

danap.








pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: sql type reported for enum
Next
From: Dave Cramer
Date:
Subject: Re: best way to convert JSONB object from result