text cast to bool bug

From: Laczi József <laczi(dot)jozsef(at)ritek(dot)hu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: text cast to bool bug
Date: 2010-03-18 10:08:24
Message-ID: 4BA1FB98.8090609@ritek.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message michel rosa 2010-03-18 10:37:47 BUG #5377: group by problem
Previous Message Robert Haas 2010-03-18 02:58:48 Re: Error when lock conflict on REPLACE function