Return-Path: Delivered-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Received: (qmail 49858 invoked from network); 13 Jul 2009 22:06:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jul 2009 22:06:30 -0000 Received: (qmail 95235 invoked by uid 500); 13 Jul 2009 22:06:40 -0000 Delivered-To: apmail-incubator-empire-db-dev-archive@incubator.apache.org Received: (qmail 95207 invoked by uid 500); 13 Jul 2009 22:06:40 -0000 Mailing-List: contact empire-db-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@incubator.apache.org Delivered-To: mailing list empire-db-dev@incubator.apache.org Received: (qmail 95197 invoked by uid 99); 13 Jul 2009 22:06:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 22:06:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of francisdb@gmail.com designates 72.14.220.154 as permitted sender) Received: from [72.14.220.154] (HELO fg-out-1718.google.com) (72.14.220.154) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 22:06:29 +0000 Received: by fg-out-1718.google.com with SMTP id l27so580170fgb.3 for ; Mon, 13 Jul 2009 15:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=W9P1A66uUp3c+gtOKusyFdbQB5zMjxbgzaIlb1sTzhc=; b=in2N0+gTCg+bW6mEfe+R0KvSEx3cprl624FYqXeTZmeLCuGnnhJgQ/BCl3XRqJSE2r bvKJJdAW8V/nTgxXTjTVgS9Roga9zpRS/uZHzMgqKnM0JcM7pujqEZQ1aGrWTbeunZhK Y3cjW9JpaAYuDWwCatYnU3piHvwDwumfsVbgE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lx3tk2yCRKg+o7XWQGzeM0fo85Z1NT+g6wjGt4Ww45qQLc1YL8ZEpVRC4TtR2kffC1 ZRj2OZ9Vi+aXSxQaQ0ED07pU4C4FV2nsxujHSd8dnxFkoVZeObFRReXi6hcv/lv7xt8J rY+iut5DkFdgfdssw0mTaYpYbQ5QGWRcOGuW8= MIME-Version: 1.0 Received: by 10.86.65.18 with SMTP id n18mr3607344fga.7.1247522768748; Mon, 13 Jul 2009 15:06:08 -0700 (PDT) In-Reply-To: <20090713211855.GA14317@green.ekch> References: <20090713211855.GA14317@green.ekch> Date: Tue, 14 Jul 2009 00:06:08 +0200 Message-ID: <3ab983230907131506t1a9471c9v97d5cd21bdae7d2e@mail.gmail.com> Subject: Re: error using apache derby and CLOB datatype From: Francis De Brabandere To: empire-db-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Eike, Thanks for reporting the bug, I added it to Jira for reference. https://issues.apache.org/jira/browse/EMPIREDB-44 I have to admit that the postgres, h2 and derby drivers were only tested using our demo application. We need to work on a decent test suite. I applied a slightly different patch only using CLOB with size as I think most people will expect a CLOB column for the CLOB data type (do you think there might be performace implications?) I started a build on hudson, it will be deployed on the apache snapshot maven repo in a few minutes: repository: https://repository.apache.org/content/repositories/snapshots Cheers, Francis On Mon, Jul 13, 2009 at 11:18 PM, wrote: > > hi there > > i was just experimenting with apache derby and found the following > situation: > > one of my columns needs to store really long texts. so what i did with > empire-db is this: > > =A0C_DESCRIPTION =3D addColumn("description", DataType.CLOB, 1024*1024, f= alse); > > not being really sure, if this is the desired way to go, it worked > with mysql (5.0.27). the same results in a "BadSQLGrammarException" > using apache derby 10.4.2.0. the CLOB datatype is translated into > this: > > =A0CREATE TABLE betmarket ( > =A0... > =A0 =A0 description LONGTEXT, > =A0... > > im really new to apache derby, but having a quick look at their page i > could not find the data type "LONGTEXT" in their manual. they have > CLOB and LONG VARCHAR as i could see. where LONG VARCHAR goes up to > 32700 characters and a CLOB may be up to 2,147,483,647. > > i will attach a tiny patch which worked in my case, but im not sure if > i missed something... > > kind regards, eike > --=20 http://www.somatik.be Microsoft gives you windows, Linux gives you the whole house.