db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Custom types / "long" datatypes in custom functions
Date Tue, 22 Feb 2005 14:18:44 GMT
David Blasby wrote:

> Unfortunately, the maximum size for varchar is only 32k.  Spatial data
> is commonly much much larger than this.  "LONG VARCHAR FOR BIT DATA"
> would be acceptable for storage, but you are unable to pass this to a
> user-defined function (or return one).

And unfortunately LONG VARCHAR FOR BIT DATA isn't much better, still
limited at around 32k. Though both those limits could be removed fairly
easily.

The issue with passing LONG VARCHAR FOR BIT DATA and BLOB into functions
is that types that need to be passed and returned are
java.io.InputStream and java.sql.Blob respectively. Derby can return
them for java.sql.ResultSet getBinaryStream and gteBlob but the logic is
 contained in the ResultSet implementation. I think that the logic from
EmbedResultSet would need to move into the type system, e.g. SQLBlob.

> Are "VARCHAR FOR BIT DATA" represented by a String type or a byte[]?

byte[]

Dan.



Mime
View raw message