X-Original-To: pgsql-general@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 45151474E42 for ; Wed, 23 Apr 2003 21:40:15 -0400 (EDT) Received: from sm181.163.com (unknown [202.108.44.181]) by postgresql.org (Postfix) with ESMTP id 12E48476333 for ; Wed, 23 Apr 2003 21:40:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sm181.163.com (Postfix) with SMTP id BB0821C462A91 for ; Thu, 24 Apr 2003 09:40:02 +0800 (CST) Received: from 192.168.0.80 (unknown [218.247.247.226]) by 192.168.1.181 (Coremail:www.163.com) with SMTP id LggAAHJApz7jFvfi.1 for ; Thu, 24 Apr 2003 09:40:02 +0800 (CST) From: "milimeter@163.com" Reply-To: milimeter@163.com Organization: milimeter@163.com To: pgsql-general@postgresql.org Subject: jdbc problem Date: Thu, 24 Apr 2003 09:38:58 +0800 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304240938.58666."milimeter@163.com"> X-Spam-Status: No, hits=-0.3 required=5.0 tests=BAYES_20,RCVD_IN_OSIRUSOFT_COM,RCVD_IN_RFCI,RCVD_IN_SBL, USER_AGENT version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/1216 X-Sequence-Number: 41281 Hi, all I have a table: CREATE TABLE person (age char(4)) After executing "select age from person" with jdbc, I extract the value with: getInt("age") Now is the problem, the same code can succeed on oracle, but on postgresql, because of not triming space automaticlly, it cause an error. So, I hope the newest jdbc driver for postgresql can automaticlly trim space just like oracle. The same problem also exists when execute insert: Provided "age" is an integer, then "insert into person values ('30')" can be executed correctly, but "insert into person values ('')" can not. On oracle, a default value will be added. So jdbc driver for postgresql should also do it. Yours, mili