db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5825) Catch type mismatch of DEFAULT values at DDL time
Date Thu, 21 Jun 2012 16:37:42 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dag H. Wanvik updated DERBY-5825:
---------------------------------

    Description: 
Derby postpones checking values in DEFAULT clauses to DML time, cf this example:

  create table t(c varchar(2) default 'foo')
  insert into t values default

According to the standard [1], an error should result at create table time. Derby throws an
error only at insert time above. Similarly for other types. Cf also discussion in DERBY-118.

Cf also comments in ColumnDefinitionNode#defaultTypeIsValid:

  "We'll check this at insertion time; see Beetle 5585 regarding the
  need to move that check to here instead of waiting until insert
  time."

We should implement correct type checking of the DEFAULT values given at DDL time.

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


  was:
Derby postpones checking values in DEFAULT clauses to DML time, cf this example:

  create table t(c varchar(2) default 'foo')
  insert into t values default

According to the standard [1], an error should result at create table
time. Derby throws an error only at insert time above. Similarly for
other types. Cf also discussion in DERBY-118. 

We should implement correct type checking of the DEFAULT values given
at DDL time.

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


    
> Catch type mismatch of DEFAULT values at DDL time
> -------------------------------------------------
>
>                 Key: DERBY-5825
>                 URL: https://issues.apache.org/jira/browse/DERBY-5825
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Dag H. Wanvik
>
> Derby postpones checking values in DEFAULT clauses to DML time, cf this example:
>   create table t(c varchar(2) default 'foo')
>   insert into t values default
> According to the standard [1], an error should result at create table time. Derby throws
an error only at insert time above. Similarly for other types. Cf also discussion in DERBY-118.
> Cf also comments in ColumnDefinitionNode#defaultTypeIsValid:
>   "We'll check this at insertion time; see Beetle 5585 regarding the
>   need to move that check to here instead of waiting until insert
>   time."
> We should implement correct type checking of the DEFAULT values given at DDL time.
> [1] https://issues.apache.org/jira/browse/DERBY-118?focusedCommentId=13397195&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13397195

--
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

        

Mime
View raw message