[ 
https://issues.apache.org/jira/browse/DERBY-5235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036238#comment-13036238
 ] 

Rick Hillegas commented on DERBY-5235:
--------------------------------------

Here's what our standards have to say about long Strings:

According to the 2008 SQL Standard, part 2, section 4.2.1 (Introduction to 
Character Strings), cf. section 6.1 (<data type>):

i) The standard String types are CHAR, VARCHAR, CLOB, NCHAR, NVARCHAR, and 
NCLOB.

According to section 4.2.3.4:

ii)  The =, <>, and NOT NULL operators must work on CLOB. However, the other 
comparison operators are not supported: >, <, >=, <=.

iii) Other supported operations are LIKE, SIMILAR, EXISTS, SOME, ANY, and 
positioning expressions.

iv) CLOBs are not supported in unique and referential constraints, or in GROUP 
BY, ORDER BY, DISTINCT, UNION, INTERSECT, and EXCEPT expressions, or in the 
join conditions of joined tables.

LONG VARCHAR is not a Standard SQL type and so the Standard provides no 
guidance for its behavior. However, a java.sql.LONGVARCHAR type was introduced 
in JDBC 1.0. It differs from java.sql.CHAR and java.sql.VARCHAR in that its 
preferred access methods are character streams rather than Strings. The actual 
java.sql.CLOB type was not introduced until JDBC 2.0.


> Remove the artificial limit on the length of VARCHAR values, allowing them to 
> be java.lang.Integer.MAX_VALUE long
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5235
>                 URL: https://issues.apache.org/jira/browse/DERBY-5235
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Rick Hillegas
>
> The original Cloudscape limit for the length of VARCHAR values was 
> java.lang.Integer.MAX_VALUE. That is the limit in Cloudscape 5.1. Nothing in 
> Derby should break if we restore the original limit. The current limit is an 
> artificial bound introduced to make Derby agree with DB2. 32672 is the upper 
> bound on the length of a DB2 VARCHAR: 
> http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0001029.htm

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to