X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DD5EA533EC for ; Wed, 13 Apr 2005 13:03:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83501-04 for ; Wed, 13 Apr 2005 16:02:58 +0000 (GMT) Received: from mail.weycogroup.com (unknown [66.162.233.194]) by svr1.postgresql.org (Postfix) with ESMTP id C389753868 for ; Wed, 13 Apr 2005 13:02:58 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.weycogroup.com (Postfix) with ESMTP id A146952959 for ; Wed, 13 Apr 2005 10:53:20 -0500 (CDT) Subject: Re: smallint vs. boolean (was invalid string enlargement From: Glenn Holmer To: pgsql-jdbc@postgresql.org In-Reply-To: <425C4733.7060107@opencloud.com> References: <42389DFC.5090408@weycogroup.com> <4238A223.4030003@opencloud.com> <4239B075.7020305@weycogroup.com> <4239EA95.4020101@opencloud.com> <1113325530.26370.50.camel@shadow.weycogroup.com> <425C4733.7060107@opencloud.com> Content-Type: text/plain Organization: Weyco Group, Inc. Date: Wed, 13 Apr 2005 11:02:56 -0500 Message-Id: <1113408176.9626.4.camel@shadow.weycogroup.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/76 X-Sequence-Number: 12683 On Wed, 2005-04-13 at 10:09 +1200, Oliver Jowett wrote: > Change the column type so it is a boolean, change the hibernate mapping > so it calls setShort(), or create the implicit cast as I suggested. I got it to work with some PL/pgSQL functions, implicit casts, and overloading the = operator (smallint, boolean). I'll strongly recommend to the vendor that they rewrite the Postgres DDL for their product to use booleans for boolean fields, but in the mean time are there any side effects I should worry about? -- ____________________________________________________________ Glenn Holmer gholmer@weycogroup.com Software Engineer phone: 414-908-1809 Weyco Group, Inc. fax: 414-908-1601