Re: cast of integer to bool doesn't work (anymore?)

Поиск
Список
Период
Сортировка
Искать
От
Achilleus Mantzios
Тема
Re: cast of integer to bool doesn't work (anymore?)
Дата
Msg-id
Pine.LNX.4.44.0303211553560.2751-100000@matrix.gatewaynet.com
Ответ на
Список
Дерево обсуждения
cast of integer to bool doesn't work (anymore?) Eric Veldhuyzen <ericv@xs4all.net>
Re: cast of integer to bool doesn't work (anymore?) Tom Lane <tgl@sss.pgh.pa.us>
Re: cast of integer to bool doesn't work (anymore?) Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: cast of integer to bool doesn't work (anymore?) Eric Veldhuyzen <ericv@xs4all.net>
Re: cast of integer to bool doesn't work (anymore?) Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: cast of integer to bool doesn't work (anymore?) Eric Veldhuyzen <ericv@xs4all.net>
Re: cast of integer to bool doesn't work (anymore?) Achilleus Mantzios <achill@matrix.gatewaynet.com>
On Fri, 21 Mar 2003, Eric Veldhuyzen wrote:

> Hi,
> 
> Here at my work we use on the production servers PostgreSQL version
> 7.2.3, but I have version 7.3.2 (from the Debian distribution) on my
> workstation. Now I noticed yesterday that the query 'select 0::boolean;'
> works on the production server, it gives the output:
> 
> # select 0::boolean;
>  bool 
> ------
>  f
> (1 row)
> 
> Perfect. But when I try this on my local version of postgreSQL I get
> this:
> 
> # select 0::boolean;
> ERROR:  Cannot cast type integer to boolean

Just wrap 0 with single quotes,
e.g.
# select '0'::boolean;

> 
> Is there someone who can axplaint to me why this is happening, did I
> forget to do something to make this work, or is this some kind of new
> 'feature' of the 7.3 version?
> 
> 

-- 
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-210-8981112
fax:    +30-210-8981877
email:  achill@matrix.gatewaynet.com       mantzios@softlab.ece.ntua.gr


В списке pgsql-sql по дате отправления
От: Eric Veldhuyzen
Дата:
От: Eric Veldhuyzen
Дата:
FAQ