Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 6132 invoked from network); 15 Aug 2007 14:58:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2007 14:58:22 -0000 Received: (qmail 95985 invoked by uid 500); 15 Aug 2007 14:58:18 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 95952 invoked by uid 500); 15 Aug 2007 14:58:18 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 95941 invoked by uid 99); 15 Aug 2007 14:58:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 07:58:18 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [217.206.42.18] (HELO mail.optrak.co.uk) (217.206.42.18) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 14:58:14 +0000 Received: from mercury.net.optrak.co.uk ([192.168.41.65]) by mail.optrak.co.uk with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 Aug 2007 15:57:52 +0100 Received: from 192.168.41.61 ([192.168.41.61] helo=mercury.net.optrak.co.uk) by ASSP-nospam; 15 Aug 2007 15:57:52 +0100 Received: from [192.168.41.87] ([192.168.41.87]) by mercury.net.optrak.co.uk with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 Aug 2007 15:57:52 +0100 Message-ID: <46C3146F.30400@optrak.co.uk> Date: Wed, 15 Aug 2007 15:57:51 +0100 From: Mark Thornton User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Derby Discussion Subject: Re: default (0) References: <46C30B90.7070605@optrak.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Aug 2007 14:57:52.0102 (UTC) FILETIME=[A751E860:01C7DF4C] X-Virus-Checked: Checked by ClamAV on apache.org Dag H. Wanvik wrote: > Mark Thornton writes: > > >> Derby 10.2.2 appears to reject constant expressions enclosed in >> parentheses (which should still be constant). >> > > I think this is correct according to the SQL standard; in section > "11.5 " of ISO/IEC 9075-2:2003, the syntax is shown > as: > > ::= DEFAULT > > ::= > > | > | USER > | CURRENT_USER > | CURRENT_ROLE > | SESSION_USER > | SYSTEM_USER > | CURRENT_PATH > | > > and once you add parentheses around the zero, it is no longer a > literal, although constant. > > Dag > The Derby documentation (10.3 http://db.apache.org/derby/docs/10.3/ref/rrefsqlj30540.html#rrefsqlj30540) has this [ [ WITH ] DEFAULT { ConstantExpression | NULL } Which indicates that something more than just a literal is accepted. So perhaps that documentation should be updated. Regards, Mark Thornton