Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A0AB10DE0 for ; Wed, 2 Oct 2013 19:43:43 +0000 (UTC) Received: (qmail 53222 invoked by uid 500); 2 Oct 2013 19:43:42 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 53200 invoked by uid 500); 2 Oct 2013 19:43:42 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 53179 invoked by uid 99); 2 Oct 2013 19:43:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 19:43:42 +0000 Date: Wed, 2 Oct 2013 19:43:42 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6367) Reference Manual incorrectly states that you can't schema-qualify constraint names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784342#comment-13784342 ] Rick Hillegas commented on DERBY-6367: -------------------------------------- Hi Kim: Yes, that's ok. Thanks. > 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 > > 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)