db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-52) Cannot create CHAR column with size greater than 254
Date Mon, 19 Jan 2009 08:13:59 GMT

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

Kristian Waagan commented on DERBY-52:

The maximum length of the CHAR data type is 254 characters.
As far as I can see, the reference manual still doesn't specify the maximum length of CHAR
correctly in all places.

Wrong/not-mentioned: http://db.apache.org/derby/docs/dev/ref/ref-single.html#rrefsqlj13733
Correct: http://db.apache.org/derby/docs/dev/ref/ref-single.html#rrefstringlimits

I filed DERBY-4025 to get the documentation fixed.

> Cannot create CHAR column with size greater than 254
> ----------------------------------------------------
>                 Key: DERBY-52
>                 URL: https://issues.apache.org/jira/browse/DERBY-52
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions:
>         Environment: Dell Dimension 2350, 2GHz P4, 1 Gig RAM, 
> Window XP Pro Version 2002, SP2
> JDK 1.4.2_03, build 1.4.2_03-b02
> Derby Snapshot SVN version 46005 (Binaries)
>            Reporter: Jason Palmatier
> An attempt to create a table that contains a column of type CHAR with a size greater
than 254 using the SQL statement
> CREATE TABLE dummyTable ( column1 char(255),column2 char(10),column3 char(10) )
> results in the following SQL Exception:
> SQL Exception: The length, precision, or scale attribute for column, or type mapping
'CHAR(255)' is not valid.
> SQL Error: 30000
> SQL State: 42611
> However, if you decrease column1's length by one as below, the table is created successfully:
> CREATE TABLE dummyTable ( column1 char(254),column2 char(10),column3 char(10) )
> The Derby Reference Manual states that the limit on the length of a CHAR data type is
> http://incubator.apache.org/derby/manuals/reference/sqlj128.html#HDRSII-SQLJ-13733

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message