db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6367) Reference Manual incorrectly states that you can't schema-qualify constraint names
Date Thu, 03 Oct 2013 13:45:42 GMT

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

ASF subversion and git services commented on DERBY-6367:
--------------------------------------------------------

Commit 1528862 from [~chaase3] in branch 'docs/branches/10.10'
[ https://svn.apache.org/r1528862 ]

DERBY-6367  Reference Manual incorrectly states that you can't schema-qualify constraint names

Merged patch DERBY-6367.diff to 10.10 doc branch from trunk revision 1528851.

> Reference Manual incorrectly states that you can't schema-qualify constraint names
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-6367
>                 URL: https://issues.apache.org/jira/browse/DERBY-6367
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Rick Hillegas
>            Assignee: Kim Haase
>         Attachments: DERBY-6367.diff, rrefconstraintname.html
>
>
> The Reference Manual section titled "constraint-Name" incorrectly states that you can't
schema-qualify the names of constraints. This is not true. What is true is that the schema
name, if supplied, must be the same as the table's schema name. This behavior of Derby is
correct and conforms to the SQL Standard, part 2, section 11.6 (table constraint definition),
syntax rule 2. The following script shows Derby's behavior:
> connect 'jdbc:derby:memory:db;create=true';
> create schema s1;
> -- fails
> create table t1
> (
>     a int,
>     constraint s1.c1 check ( a > 0 )
> );
> -- succeeds
> create table t2
> (
>     a int,
>     constraint c2 check ( a > 0 )
> );
> -- succeeds
> create table t3
> (
>     a int,
>     constraint app.c3 check ( a > 0 )
> );
> -- fails because the name conflicts with an existing constraint name
> create table t4
> (
>     a int,
>     constraint c3 check ( a > 0 )
> );



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message