pgsql: Fix query-based tab completion for multibyte characters.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix query-based tab completion for multibyte characters.
Date: 2016-03-04 16:58:05
Message-ID: E1abt3F-0003Zf-07@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix query-based tab completion for multibyte characters.

The existing code confuses the byte length of the string (which is
relevant when passing it to pg_strncasecmp) with the character length
of the string (which is relevant when it is used with the SQL substring
function). Separate those two concepts.

Report and patch by Kyotaro Horiguchi, reviewed by Thomas Munro and
reviewed and further revised by me.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b4895bf796d66245080cb37acaf2b396014b7225

Modified Files
--------------
src/bin/psql/tab-complete.c | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2016-03-04 17:08:52 pgsql: Improve support of Hunspell in ispell dictionary.
Previous Message Robert Haas 2016-03-04 16:58:04 pgsql: Fix query-based tab completion for multibyte characters.