Skip site navigation (1) Skip section navigation (2)

Re: text cast to bool bug

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Laczi József <laczi(dot)jozsef(at)ritek(dot)hu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: text cast to bool bug
Date: 2010-03-18 10:37:53
Message-ID: 162867791003180337g86e961byd293ffae3c313410@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hello

It works on my server. Do you have a some specific configuration?

postgres=# select ('true'::text)::bool;
 bool
------
 t
(1 row)

I am checked 8.3, 8.4, 9.0.

Regards
Pavel Stehule

2010/3/18 Laczi József <laczi(dot)jozsef(at)ritek(dot)hu>:
> I think this is a funny bug:
>
> select ('TRUE'::TEXT)::BOOL;
> bool
> ------
> f
>
> but:
>
> select ('TRUE'::varchar(4))::BOOL;
> bool
> ------
> t
> or
>
> select ('true'::TEXT)::BOOL;
> bool
> ------
> t
>
>
> My postgresql version:
> PostgreSQL 8.3.4
>
>
> Laczi József
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Responses

pgsql-bugs by date

Next:From: CaTDate: 2010-03-18 10:43:52
Subject: Re: text cast to bool bug
Previous:From: michel rosaDate: 2010-03-18 10:37:47
Subject: BUG #5377: group by problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group