Re: 0/1 vs true/false - Mailing list pgsql-general

From Franco Bruno Borghesi
Subject Re: 0/1 vs true/false
Date
Msg-id 1058990482.765.5.camel@taz
Whole thread Raw
In response to Re: 0/1 vs true/false  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
and what about boolean attirbutes in where clauses? Is any difference between

-SELECT ... WHERE boolean_field
and
-SELECT ... WHERE boolean_field=true
?

On Wed, 2003-07-23 at 11:48, Tom Lane wrote:
Franco Bruno Borghesi <franco@akyasociados.com.ar> writes:
> This makes me wonder, what about 't' and 'f'?... will they disappear in
> newer versions of postgreSQL?

No.  See my comment about I/O representations being outside the spec.
There is no inconsistency in the following examples:

regression=# select true;bool
------t
(1 row)

regression=# select t;
ERROR:  attribute "t" not found
regression=# select 't'::boolean;bool
------t
(1 row)

regression=# select '1'::boolean;bool
------t
(1 row)

		regards, tom lane
Attachment

pgsql-general by date:

Previous
From: "Rob Sell"
Date:
Subject: Join Problem
Next
From: "scott.marlowe"
Date:
Subject: Re: Join Problem