Re: The result of the pattern matching is incorrect when the patternstring is bpchar type

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: The result of the pattern matching is incorrect when the patternstring is bpchar type
Дата
Msg-id CAKFQuwY9W2ijr5SY0uPXkJKwBn9GuxW2jjJ3m_ywAEX7Gbm4tA@mail.gmail.com
обсуждение исходный текст
Ответ на The result of the pattern matching is incorrect when the patternstring is bpchar type  (甄明洋 <zhenmingyang@yeah.net>)
Ответы Re: The result of the pattern matching is incorrect when the pattern string is bpchar type  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15888: Bogus "idle in transaction" state for logical decoding client after creating a slot
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15904: ERROR: argument of LIMIT must not contain variables