From: | "Alexander Farber" <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Knowing the length(convert(username using windows_1251_to_utf8)) |
Date: | 2007-01-11 09:33:22 |
Message-ID: | 943abd910701110133o1314c469k7b66985ee8cbb0f2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
And additional question please:
Can I still be sure that the data returned in the
convert(username using windows_1251_to_utf8)
column will be 0-terminated or should I fetch
the data length using PQgetlength and maintain
that value in my C-program?
Thank you
Alex
On 1/11/07, Alexander Farber <alexander(dot)farber(at)gmail(dot)com> wrote:
> phpbb=> show client_encoding;
> -----------------
> WIN1251
> (1 row)
>
> phpbb=> \d phpbb_users;
> ........
> username | character varying(25) | not null default ''::character
> ........
>
> phpbb=> select username, length(username), length(convert(username
> using windows_1251_to_utf8)) from phpbb_users where user_id=224;
> username | length | length
> -----------------+--------+--------
> Лукашенко И. В. | 15 | 26
> (1 row)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Shane Ambler | 2007-01-11 09:54:19 | Re: PG compilation |
Previous Message | Shane Ambler | 2007-01-11 09:33:17 | Re: Postgres Replication |