Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 2983 invoked from network); 23 Feb 2007 15:35:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2007 15:35:25 -0000 Received: (qmail 14946 invoked by uid 500); 23 Feb 2007 15:35:31 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 14871 invoked by uid 500); 23 Feb 2007 15:35:31 -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 14839 invoked by uid 99); 23 Feb 2007 15:35:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 07:35:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.82.107.6] (HELO red.amberpoint.com) (63.82.107.6) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 07:35:20 -0800 Received: from [127.0.0.1] (bp-laptop.edgility.com [10.10.11.121]) by red.amberpoint.com (8.12.11/8.12.11) with ESMTP id l1NFYwAg001030 for ; Fri, 23 Feb 2007 07:34:58 -0800 (PST) Message-ID: <45DF09A1.8050801@amberpoint.com> Date: Fri, 23 Feb 2007 07:34:57 -0800 From: Bryan Pendleton User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Derby Discussion Subject: Re: problem with ALTER COLUMN DEFAULT on VARCHAR column References: <45DDDCB6.8050707@amberpoint.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > If however the column contains data then the SELECT MAX... returns a > string value. Hi Tim, I think you've pinpointed this one, and I think it's definitely a bug. Can you file it in Jira so we can get it fixed? Here's a simple script: -bash-2.05b$ java org.apache.derby.tools.ij ij version 10.3 ij> connect 'jdbc:derby:brydb'; ij> create table t (a varchar(10)); 0 rows inserted/updated/deleted ij> alter table t alter column a default 'my val'; 0 rows inserted/updated/deleted ij> insert into t (a) values ('hi'); 1 row inserted/updated/deleted ij> alter table t alter column a default 'another val'; ERROR 22018: Invalid character string format for type long. thanks, bryan