Re: Boolean test

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Boolean test
Дата
Msg-id GNELIHDDFBOCMGBFGEFOAEMFCBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Boolean test  (Rudi Starcevic <rudi@oasis.net.au>)
Список 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




В списке pgsql-sql по дате отправления:

Предыдущее
От: Rudi Starcevic
Дата:
Сообщение: Boolean test
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Boolean test