You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2012/06/23 00:16:42 UTC

[jira] [Commented] (DERBY-5829) Lift DB2 restrictions on the DEFAULT clause

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

Dag H. Wanvik commented on DERBY-5829:
--------------------------------------

Attaching a patch originally first attached to DERBY-118 as derby-118-limited-even-more-b, here called derby-5829, for addressing a).

It removes the restriction on VARCHAR defaults length to maximally 254 characters.

                
> Lift DB2 restrictions on the DEFAULT clause
> -------------------------------------------
>
>                 Key: DERBY-5829
>                 URL: https://issues.apache.org/jira/browse/DERBY-5829
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Dag H. Wanvik
>
> DERBY-118 started out as a request to allow date-time functions values to be assigned to character columns. This is not standard SQL, but it turns out the Derby allows such conversions at DML time, e.g. in an INSERT statement. Investigating this we found that there a re several instances in which Derby is more restrictive in type conversion at DDL time that at DML time. These instances can be classifies as
> a) legacy restrictions that are DB2 specific, but would be legal SQL if lifted
> b) restrictions that are not legal SQL per the standard
> This subtask addresses a). The original request falls into category b) and we decided not to fix those since this would allow users to write non-standard SQL, notwithstanding that fact the Derby also extends on the standard at DML time. Ideally, we would restrict those cases to follow the standard as well, but that woudl cause compatibility concerns.
> Furthermore, a related issue is that type checks at DDL time, e.g. that a character literal is not too long for its column, are performed at DML time. This is not as per the standard, and we track an improvement in this area as
>  c) Catch type mismatch of DEFAULT values at DDL time (DERBY-5825)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira