Re: sql type reported for enum

From: dmp <danap(at)ttc-cmc(dot)net>
To: rcohen(at)e1b(dot)org, PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: sql type reported for enum
Date: 2015-08-20 00:40:16
Message-ID: 55D521F0.60503@ttc-cmc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

rcohen(at)e1b(dot)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.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2015-08-20 02:13:42 Re: best way to convert JSONB object from result
Previous Message Dave Cramer 2015-08-19 19:27:49 Re: sql type reported for enum