Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44719 invoked from network); 28 Mar 2006 23:14:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Mar 2006 23:14:00 -0000 Received: (qmail 73418 invoked by uid 500); 28 Mar 2006 23:13:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73186 invoked by uid 500); 28 Mar 2006 23:13:58 -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 73175 invoked by uid 99); 28 Mar 2006 23:13:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 15:13:58 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [68.142.198.204] (HELO smtp105.sbc.mail.mud.yahoo.com) (68.142.198.204) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 28 Mar 2006 15:13:57 -0800 Received: (qmail 83705 invoked from network); 28 Mar 2006 23:13:36 -0000 Received: from unknown (HELO ?127.0.0.1?) (ddebrunner@sbcglobal.net@71.131.220.51 with plain) by smtp105.sbc.mail.mud.yahoo.com with SMTP; 28 Mar 2006 23:13:36 -0000 Message-ID: <4429C31F.5040102@apache.org> Date: Tue, 28 Mar 2006 15:13:35 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Compatibility guarantees for SQL states and messages References: <44288508.6060700@sun.com> <442995A2.7020705@sbcglobal.net> <4429BFBC.7000406@sun.com> In-Reply-To: <4429BFBC.7000406@sun.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N David W. Van Couvering wrote: > Thanks, Kathey. What if I find an existing SQLState in the embedded > code that uses a Derby-specific SQL State but which I think really > should be a standard SQL state? > > For example, I think 42X89 ("Types ''{0}'' and ''{1}'' are not type > compatible. Neither type is assignable to the other type.") really is a > case of the standard SQL State 22005 - "error in assignment" Ideally since these SQLState's are from the SQL Standard there should no "I think" about changing any. It should be driven from the specification, e.g. text that says "... then an exception condition is raised: data exception � error in assignment." In this specific case '22' is a data exception, some exception raised due to the value of the data. '42' is a compile time error, in this case raised because the types are not assignable to each other, not because the specific data values are not assignable to each other. We just need to be careful when selecting errors to ensure we are using SQL states correctly. Dan.