Subject Re: bugs in DatabaseMetaData
That's somewhat annoying that it works the way it does, isn't it?
(I've put some wrappers around most of the metadata queries I do to
trim the strings and do some other stuff, but it does seem like a
bother that could be easily handled in the driver.) However, the
nature of a CHAR(31) column is that it gets blank-padded to the
declared width, so the fact that it comes back with trailing blanks
isn't so surprising. At least this is what I'd expect from my somewhat
limited experience with other SQL DB's--mostly Sybase, some MS
SQL--and almost none of this using JDBC.

I'm curious to know if you've worked with other JDBC-driver/DB-engine
combinations that had different behavior for a CHAR type column (as
opposed to say VARCHAR).

J M Craig

--- In IB-Java@y..., Massimo Ferrari <massimo@r...> wrote:
> But since RDB$FIELD_NAME is declared to be CHAR(31),
> the ResultSet will
> contain a 31 chars long String, even if the column
> name is just e.g. 6 chars
> long.
> The specs just say that the ResultSet contains a
> field COLUMN_NAME with the
> name of the column, and IMHO it is a task of the
> driver to trim the string
> before it is returned.
> The same problems applies to other fields (e.g.
> TABLE_NAME in getTables).
> Massimo