X-Original-To: pgsql-jdbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 803184762E1 for ; Wed, 23 Apr 2003 22:22:10 -0400 (EDT) Received: from sm206.163.com (unknown [202.108.44.206]) by postgresql.org (Postfix) with ESMTP id D0EE5476340 for ; Wed, 23 Apr 2003 22:22:03 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sm206.163.com (Postfix) with SMTP id 8ECEC1C9C2CF4 for ; Thu, 24 Apr 2003 10:22:01 +0800 (CST) Received: from 192.168.0.80 (unknown [218.247.247.226]) by 192.168.1.206 (Coremail:www.163.com) with SMTP id 9gQAAElKpz5hIffi.1 for ; Thu, 24 Apr 2003 10:22:01 +0800 (CST) From: "milimeter@163.com" Reply-To: milimeter@163.com Organization: milimeter@163.com To: pgsql-jdbc@postgresql.org Subject: jdbc problem Date: Thu, 24 Apr 2003 10:20:54 +0800 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="gb18030" Content-Transfer-Encoding: 7bit Message-Id: <200304241020.54649."milimeter@163.com"> X-Spam-Status: No, hits=0.9 required=5.0 tests=BAYES_20,RCVD_IN_NJABL,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/213 X-Sequence-Number: 7052 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