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

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

From
Robert Haas
Date:
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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9445db925e78c2c4fb12067ad5618e2aecabe109

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