Re: multibyte support - Mailing list pgsql-general

From Tom Lane
Subject Re: multibyte support
Date
Msg-id 8621.1068649806@sss.pgh.pa.us
Whole thread Raw
In response to Re: multibyte support  (Ma Siva Kumar <siva@leatherlink.net>)
Responses Re: multibyte support [Resolved]
List pgsql-general
Ma Siva Kumar <siva@leatherlink.net> writes:
> On Tuesday 11 Nov 2003 9:02 pm, Dennis Gearon wrote:
>> This is something I've been wondereing about for quite awhile - does
>> pgsql measure bytes or chars when using UTF for varchars. It looks like
>> bytes, which is counter intuitive.

The measurement is certainly in characters, in 7.3 and later.  In 7.2 it
was in characters if you'd enabled multibyte.  Once upon a time it was
in bytes, but I don't believe that applies to Ma Siva Kumar's problem.

> 在您的系统中直接获 (entered through html form processed by php script) shows as
> 在您的系统 when seen with psql. Anything more
> than this is rejected for lack of space (the size is varchar(100)

I think there is some confusion between you and the database about
character set encoding.  Double check what the database encoding is
(psql \l will tell you).  And double check what the system thinks the
client-side encoding is ("show client_encoding" and/or \encoding).

            regards, tom lane

pgsql-general by date:

Previous
From: Christopher Murtagh
Date:
Subject: Re: plperl/createlang issue
Next
From: Paulo Jan
Date:
Subject: Perfomance difference between 7.2 and 7.3