Re: text cast to bool bug - Mailing list pgsql-bugs

From CaT
Subject Re: text cast to bool bug
Date
Msg-id 20100318104352.GL2657@zip.com.au
Whole thread Raw
In response to Re: text cast to bool bug  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
On Thu, Mar 18, 2010 at 11:37:53AM +0100, Pavel Stehule wrote:
> postgres=# select ('true'::text)::bool;
>  bool
> ------
>  t
> (1 row)
>
> I am checked 8.3, 8.4, 9.0.

What about the 'TRUE' (all caps) case? Note the blow:

> 2010/3/18 Laczi József <laczi.jozsef@ritek.hu>:
> > I think this is a funny bug:
> >
> > select ('TRUE'::TEXT)::BOOL;
> > bool
> > ------
> > f
...
> > select ('true'::TEXT)::BOOL;
> > bool
> > ------
> > t

--
  "A search of his car uncovered pornography, a homemade sex aid, women's
  stockings and a Jack Russell terrier."
    - http://www.news.com.au/story/0%2C27574%2C24675808-421%2C00.html

pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: text cast to bool bug
Next
From: "lsasha"
Date:
Subject: BUG #5378: Little inaccuracy in the manual