Обсуждение: boolean type cast

Поиск
Список
Период
Сортировка

boolean type cast

От
Taiki Yamaguchi
Дата:
Hi,

I found a minor glitch in the documentation for 8.1 where it talks about
boolean data type.

Here is what the documentation says:

"Tip:  Values of the boolean type cannot be cast directly to other types
(e.g., CAST (boolval AS integer) does not work)."


It is true for pre-8.1. As for 8.1, however, boolean type cast works:

=# select true::int;
 int4
------
    1
(1 row)



regards,


--
Taiki Yamaguchi



Re: boolean type cast

От
Tom Lane
Дата:
Taiki Yamaguchi <yamaguti@sra.co.jp> writes:
> I found a minor glitch in the documentation for 8.1 where it talks about
> boolean data type.

Yeah, looks like we missed updating that bit :-(

I'm tempted to just delete the whole <tip>.  Is there a reason to insert
some other text in its place?  If so, what to say?

            regards, tom lane