pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: 甄明洋 <zhenmingyang@yeah.net>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: The result of the pattern matching is incorrect when the pattern string is bpchar type
Date: Thu, 11 Jul 2019 18:26:52 +0100
Message-ID: <87k1co4hfu.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAKFQuwY9W2ijr5SY0uPXkJKwBn9GuxW2jjJ3m_ywAEX7Gbm4tA@mail.gmail.com>
References: <68c3aa88.331d9.16be0a5d184.Coremail.zhenmingyang@yeah.net>
<CAKFQuwY9W2ijr5SY0uPXkJKwBn9GuxW2jjJ3m_ywAEX7Gbm4tA@mail.gmail.com>
>>>>> "David" == David G Johnston <david.g.johnston@gmail.com> writes:
>> 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.
David> A similar complaint was made the other day; Tom's response
David> succinctly sums up the prevailing opinion as to the character
David> type.
It's also listed as WONTFIX here:
https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard#Trailing_spaces_in_character.28n.29
though I guess adding the LIKE case as an example there might be good.
--
Andrew (irc:RhodiumToad)
view thread (3+ messages)
Message-ID: <87k1co4hfu.fsf@news-spur.riddles.org.uk> Permalink: ../87k1co4hfu.fsf@news-spur.riddles.org.uk/ Also on: postgresql.org/message-id/87k1co4hfu.fsf@news-spur.riddles.org.uk ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: andrew@tao11.riddles.org.uk, david.g.johnston@gmail.com, zhenmingyang@yeah.net Subject: Re: The result of the pattern matching is incorrect when the pattern string is bpchar type In-Reply-To: <87k1co4hfu.fsf@news-spur.riddles.org.uk> References: <68c3aa88.331d9.16be0a5d184.Coremail.zhenmingyang@yeah.net> <CAKFQuwY9W2ijr5SY0uPXkJKwBn9GuxW2jjJ3m_ywAEX7Gbm4tA@mail.gmail.com> <87k1co4hfu.fsf@news-spur.riddles.org.uk> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox