Skip site navigation (1) Skip section navigation (2)

Re: Casting INT4 to BOOL...

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Sean Chittenden <chitt(at)speakeasy(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Casting INT4 to BOOL...
Date: 2004-10-12 02:45:40
Message-ID: 20041011194349.N32083@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-patches
On Mon, 11 Oct 2004, Sean Chittenden wrote:

> > The patch treats any non-zero value as "true". Is that the behavior we
> > want, or should we only allow "1" as an integer representation of
> > "true"? (I'm not sure myself, I just don't think copying C here is
> > necessarily the best guide.)
>
> I would posit that this is the desired behavior as it's consistent with
> every language I can think of.

However, AFAIK it's inconsitent with the type input function which
supports '1' and '0' but not other integers.


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-10-12 03:48:51
Subject: Re: Casting INT4 to BOOL...
Previous:From: Neil ConwayDate: 2004-10-12 02:37:05
Subject: fix vpath build break

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group