Alvaro Herrera <alvhe...@commandprompt.com> wrote: >> 1) Functions like char_length() or length() do NOT return the number >> of characters (the manual says they do), instead they return the >> number of code points. > > I think you have client_encoding misconfigured. > > alvherre=# select length('รก'::text); > length > -------- > 1 > (1 fila) The OP didn't say it returned the number of bytes. Since you found that this character was stored in only two bytes, it must have been one two-byte code point. I think storing it as two code points would have taken at least three bytes (one for the letter and two for the accent), no? -Kevin
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers