Re: Boolean test

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Rudi Starcevic" <rudi(at)oasis(dot)net(dot)au>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Boolean test
Date: 2002-03-15 04:58:02
Message-ID: GNELIHDDFBOCMGBFGEFOAEMFCBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I can't see why my sql here is throwing an error,
> SELECT *
> FROM plan_template
> WHERE public = true;
>
> The field public is 'boolean'

That should work perfectly...

> I've also tried :
> WHERE public = 'true';
^^^ Won't work (I think)
> WHERE public = t;
^^^ Won't work (I think)
> WHERE public = 't';
^^^ Will work
> WHERE public = 'Yes';
^^^ Won't work (I think)

However, the cleanest way to do it is like this:

SELECT *
FROM plan_template
WHERE public;

Since none of the above are working for you, I think there's something wrong
with your schema...

Chris

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2002-03-15 05:10:05 Re: Boolean test
Previous Message Rudi Starcevic 2002-03-15 04:32:57 Boolean test