Re: Error with Clob

Fred Toussi <[email protected]>
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <1364239899.8432.140661209018041.234D6EA3@webmail.messagingengine.com>
You can find the size of any column, including CLOB, by querying the
INFORMATION_SCHEMA.COLUMNS table.

But you cannot write a cast with a dynamic size.

As the VARCHAR parameter is in memory, it makes good sense to use a
fixed size limit to avoid out of memory errors at runtime.

Fred

On Mon, Mar 25, 2013, at 19:16, Tmo_hsqldb_q wrote:
> Is it possible to dynamically at runtime detect the column size of
> newrow.clobcolumn and then use that size and pass it into the
> varchar(<size>) in the cast below?
> 
> 
> CREATE TRIGGER testtable3_TRIG AFTER INSERT ON testtable3 
> referencing NEW ROW AS newrow 
> FOR EACH ROW WHEN (newrow.clobcolumn IS NOT NULL) 
> CALL testtableupdate3(CAST(newrow.clobcolumn AS VARCHAR(<at runtime enter
> size here?>))); 
> 
> 
> I know this is not necessary as VARCHAR only allocates the memory that is
> required.  But just double checking to see if something like that is
> possible.
> 
> many thanks,
> Tony
> 
> 
> 
> --
> View this message in context:
> http://hsqldb.10974.n7.nabble.com/Error-with-Clob-tp151p3866.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Hsqldb-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.