Re: The result of the pattern matching is incorrect when the patternstring is bpchar type - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: The result of the pattern matching is incorrect when the patternstring is bpchar type
Date
Msg-id CAKFQuwY9W2ijr5SY0uPXkJKwBn9GuxW2jjJ3m_ywAEX7Gbm4tA@mail.gmail.com
Whole thread Raw
In response to The result of the pattern matching is incorrect when the patternstring is bpchar type  (甄明洋 <zhenmingyang@yeah.net>)
Responses Re: The result of the pattern matching is incorrect when the pattern string is bpchar type
List pgsql-bugs
On Thu, Jul 11, 2019 at 3:48 AM 甄明洋 <zhenmingyang@yeah.net> wrote:
There are two tables with the type of column is char. when Using a 'like' predicate in a join condition will result in an incorrect result. 
Because  there is no 'like' operator that left operand and right operand are all bpchar.(bpchar ~~ bpchar), final the operator 'bpchar ~~ text' will be found form candidate set. so database do the cast from bpchar to text, The space at the end of the string was removed during the cast.

A similar complaint was made the other day; Tom's response succinctly sums up the prevailing opinion as to the character type.


In short, don't use character.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15888: Bogus "idle in transaction" state for logical decoding client after creating a slot
Next
From: PG Bug reporting form
Date:
Subject: BUG #15904: ERROR: argument of LIMIT must not contain variables