X-Original-To: pgsql-sql@postgresql.org Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id ABFD547580B for ; Fri, 21 Mar 2003 10:07:59 -0500 (EST) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50] (may be forged)) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h2LJK1Is003144; Fri, 21 Mar 2003 17:20:01 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h2LJK1qc003140; Fri, 21 Mar 2003 17:20:01 -0200 Date: Fri, 21 Mar 2003 17:20:01 -0200 (GMT+2) From: Achilleus Mantzios To: Eric Veldhuyzen Cc: pgsql-sql@postgresql.org Subject: Re: cast of integer to bool doesn't work (anymore?) In-Reply-To: <20030321150138.GE6540@opium.xs4all.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200303/502 X-Sequence-Number: 12541 On Fri, 21 Mar 2003, Eric Veldhuyzen wrote: > On Fri, Mar 21, 2003 at 04:46:17PM -0200, Achilleus Mantzios wrote: > > > > Currently (7.3) all input can be handled if fed as text. > > So what you can do is simply: > > > > my $sth = $dbh->prepare( > > "INSERT INTO object_def (name, meant_as_subobject) VALUES (?,?)"); > > $sth->execute('test', '0'); > > Ah, thanks, that seems to work, with only minor modifications to our > code. Is there any reason why integers are no longer convertable to > booleans? There has been some general rectification on the casting system in 7.3.*. > > -- ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr