Re: 0/1 vs true/false

Поиск
Список
Период
Сортировка
От Franco Bruno Borghesi
Тема Re: 0/1 vs true/false
Дата
Msg-id 1058990482.765.5.camel@taz
обсуждение исходный текст
Ответ на Re: 0/1 vs true/false  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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
Вложения

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

Предыдущее
От: "Rob Sell"
Дата:
Сообщение: Join Problem
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Join Problem