RE: Multibyte examples

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: jklcom(at)mindspring(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: RE: Multibyte examples
Date: 2001-02-21 04:01:22
Message-ID: 20010221130122Q.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Jeff Lu" <jklcom(at)mindspring(dot)com>
Subject: RE: Multibyte examples
Date: Tue, 20 Mar 2001 22:17:39 -0500
Message-ID: <NDBBIHPECLIGKCCLMACACEPMCJAA(dot)jklcom(at)mindspring(dot)com>

> Please excuse my ignorance in PostgreSQL for I'm new to this.
>
> This is what I got when tried to run mbregress.sh, what am I missing?
>
> destroydb: not found
> destroydb: not found
> /usr/local/pgsql/bin/pg_encoding: not found
> destroydb: not found
> destroydb: not found
[snip]

It is likely your PostgreSQL installation or your personal environment
settings are not correct. Please read the INSTALL doc carefully and
try again.

> I looked in the examples such as
> Big5: src/test/mb/big5.sql
> EUC_CN: src/test/mb/euc_cn.sql
> EUC_TW: src/test/mb/euc_tw.sql
>
>
> Are these files excutable?

No. These are just SQL files. You can execute them like:

psql -e -f src/test/mb/big5.sql your_database_name

> I want to see some examples using C API to
> read/write to database using Big5 encoding. I'm just not sure what to do
> before writing the data to the database. Do I need to do any conversion?

There are C examples somewhere under the source tree.

To use Big5 in frontend side, you just set an environment variable
called "PGCLIENTENCODING" to "Big5". Note that PostgreSQL 7.0.x has
bugs thus it will not work with this feature. Grab
ftp://ftp.sra.co.jp/pub/cmd/postgres/7.0.3/patches/libpq.patch.gz and
apply it. Or you could use 7.1 beta.
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-02-21 04:58:12 Re: RE: Multibyte examples
Previous Message Hiroshi Inoue 2001-02-21 03:35:53 Re: Re: [ADMIN] v7.1b4 bad performance