Re: cast of integer to bool doesn't work (anymore?)

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Eric Veldhuyzen <ericv(at)xs4all(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: cast of integer to bool doesn't work (anymore?)
Date: 2003-03-21 19:20:01
Message-ID: Pine.LNX.4.44.0303211717480.2751-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-03-21 19:45:58 Re: Diffcult query
Previous Message Mario Alberto Soto Cordones 2003-03-21 18:50:23