Re: psql completion for ids in multibyte string - Mailing list pgsql-hackers

From Amit Langote
Subject Re: psql completion for ids in multibyte string
Date
Msg-id 563B224B.3020400@lab.ntt.co.jp
Whole thread Raw
In response to psql completion for ids in multibyte string  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: psql completion for ids in multibyte string  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Horiguchi-san,

On 2015/11/05 18:10, Kyotaro HORIGUCHI wrote:
> Hello. I don't know whether this is a bug fix or improvement,

Would it be 50-50? :-)

...

> 
> During the investigation into this issue, I found a mistake in
> the comment for PQmblen. It give the byte length of the character
> at the point, not word. The attached patche also fixes it.
> 
>> /*
>>  * returns the byte length of the word beginning s, using the
>>  * specified encoding.
>>  */
>> int
>> PQmblen(const char *s, int encoding)
> 

In the following change,

- * returns the byte length of the word beginning s, using the
- * specified encoding.
+ * returns the byte length of the character beginning s, using the specified
+ * encoding.


Just a minor nitpick -

... character beginning *at* s ...?

If so, there would be one more instance to fix.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: OS X El Capitan and DYLD_LIBRARY_PATH
Next
From: Fabien COELHO
Date:
Subject: Re: extend pgbench expressions with functions