[
https://issues.apache.org/jira/browse/DERBY-6479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901472#comment-13901472
]
Rick Hillegas edited comment on DERBY-6479 at 2/14/14 2:51 PM:
---------------------------------------------------------------
Our documentation on casts seems to be confused. The 10.10 Reference Guide
section titled "CAST function" asserts the opposite of the facts. It says that
you can cast other binary types to BLOB and you can only cast BLOB to BLOB.
was (Author: rhillegas):
Once this change is made, we should update the table in the 10.10 Reference
Guide section titled "CAST function".
> Allow cast of BLOB to other binary types
> ----------------------------------------
>
> Key: DERBY-6479
> URL: https://issues.apache.org/jira/browse/DERBY-6479
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.11.0.0
> Reporter: Rick Hillegas
>
> The SQL Standard allows explicit casts between all binary types. See the 2011
> edition of the Standard, part 6.13 (cast specification), syntax rule 6.
> However, Derby doesnt' allow casts of BLOB to other binary types. We should
> allow this. The following script shows the current behavior:
> connect 'jdbc:derby:memory:db;create=true';
> create table blobTable( a blob );
> create table binaryTable( a varchar( 16 ) for bit data );
> -- works
> insert into binaryTable select cast( a as varchar( 16 ) for bit data ) from
> blobTable;
> -- fails
> insert into blobTable select cast( a as blob ) from binaryTable;
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)