Fix query-based tab completion for multibyte characters.
authorRobert Haas
Fri, 4 Mar 2016 16:53:20 +0000 (11:53 -0500)
committerRobert Haas
Fri, 4 Mar 2016 16:57:23 +0000 (11:57 -0500)
commit8de488d009e6280f4b80b634ee0fe79b6b34689e
tree51b6210bf42f57692da8012afcda2eebdf0d8e5a
parentc7327561f75717205d0790e8629b5ea676b8b962
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.
src/bin/psql/tab-complete.c