BUG #12458: Comparison with CHAR is inconsistent between string types - Mailing list pgsql-bugs

From tneumann@users.sourceforge.net
Subject BUG #12458: Comparison with CHAR is inconsistent between string types
Date
Msg-id 20150107213932.11501.27271@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #12458: Comparison with CHAR is inconsistent between string types  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12458
Logged by:          Thomas Neumann
Email address:      tneumann@users.sourceforge.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.

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: RLS bug?
Next
From: adeconsulting@pacbell.net
Date:
Subject: BUG #12460: Extracting epoch from timestamp string incorrectly assumes "with time zone"