Re: Re: (Update) Implicit smallint to boolean conversion? - Mailing list pgsql-general

From Brice Ruth
Subject Re: Re: (Update) Implicit smallint to boolean conversion?
Date
Msg-id 3A8BE883.624FE5D4@webprojkt.com
Whole thread Raw
In response to (Update) Implicit smallint to boolean conversion?  (Brice Ruth <brice@webprojkt.com>)
List pgsql-general
True ... good thing that's not what I set it to :)  I used:

(c == '1') which is more appropriate, I guess. :)  That way 'f' will
still evaluate to false.

-Brice

Martijn van Oosterhout wrote:
>
> Brice Ruth wrote:
> > Fixes the problem.  This could probably be improved to:
> >
> > return ((c == 't') || (c == 'T') || (c != '0'));
> >
> > and in that way any result is 'true' and only '0' returns false (for SMALLINT).
>
> That statement doesn't have the effect you want :)
>
> 'f' != '0'
>
> --
> Martijn van Oosterhout <kleptog@cupid.suninternet.com>
> http://cupid.suninternet.com/~kleptog/

--
Brice Ruth
WebProjkt, Inc.
VP, Director of Internet Technology
http://www.webprojkt.com/

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: replica question
Next
From: Tom Lane
Date:
Subject: Re: Postmaster crashes