BUG #12458: Comparison with CHAR is inconsistent between string types

From: tneumann(at)users(dot)sourceforge(dot)net
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12458: Comparison with CHAR is inconsistent between string types
Date: 2015-01-07 21:39:32
Message-ID: 20150107213932.11501.27271@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12458
Logged by: Thomas Neumann
Email address: tneumann(at)users(dot)sourceforge(dot)net
PostgreSQL version: 9.4.0
Operating system: Linux 3.16
Description:

The following two queries return different results:

select 'A'::char(1)='A '::text;
select 'A'::char(1)='A '::varchar(10);

I would expect both queries to return "true", and this is also suggested by
the documentation (section 8.3.), but the text comparison returns false.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message adeconsulting 2015-01-08 00:44:00 BUG #12460: Extracting epoch from timestamp string incorrectly assumes "with time zone"
Previous Message Stephen Frost 2015-01-07 20:35:09 Re: RLS bug?