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: [jira] Created: (DERBY-438) Update triggers on tables with blob columns fail at execution time if the triggered-SQL-statement references the blob column(s).
Date Sat, 02 Jul 2005 00:48:35 GMT
Army wrote:

> Daniel John Debrunner wrote:
> 
>>
>> I'm suprised this is not documented, BLOB and CLOB columns do not work
>> with triggers. This is because within the database engine, there is no
>> mechanism to create a java.sql.Blob object (or Clob) from a SQL BLOB
>> (CLOB) datatype. The java.sql.Blob returned from a ResultSet is handled
>> at the JDBC layer, not within the engine. This is the same reason as to
>> why BLOB and CLOB types cannot be passed into a method or function.
> 
> 
> 1) Does this mean that we don't support _any_ triggers that are defined
> on tables having lob columns?  Or is there some qualifier to that?

Sorry, I think the qualifier should have been: accessing LOB columns of
the modified table by the action statement is not supported.

> 2) If we don't support this, should there be code to catch this scenario
> and print out a more friendly error message?  The existing error ("An
> attempt was made to put a data value of type
> 'org.apache.derby.impl.jdbc.EmbedBlob' into a data value of type
> 'BLOB'") isn't altogether intuitive.

That would be one approach.

> 
> 3) Should I change this to a documentation error, then?

There are really three issues:

 - document the current restrictions
 - with the current restriction produce a better error message
 - implement LOB support in the referenced tables.

Dan.


Mime
View raw message