Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] About PQsetClientEncoding(),"SET NAMES",and "SET CLIENT_ENCODING"

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: cch(at)cc(dot)kmu(dot)edu(dot)tw
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: [HACKERS] About PQsetClientEncoding(),"SET NAMES",and "SET CLIENT_ENCODING"
Date: 2000-12-29 19:00:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-hackerspgsql-patches
We have merged README.mb into the official SGML docs, so the file is
gone.  Not sure what setup we have for SGML docs in different languages.



Tatsuo Ishii  wrote:

> Here are the patches I promised against PHP
> 3.0.15 or later.
> To set the client encoding to BIG5:
> pg_setclientencoding($cid, "BIG5");
>   ($cid is the connection id)
> To get the current client encoding:
> pg_clientencoding($cid);
> Note that these fucntions are already included in the latest PHP4.

Thank you!
Your README.mb has been translate into Chinese (Big5 encoding) in the
Would someone like to review it?
After translating it, I still have one question: (Sorry, I have not read the
source code.)
What is the difference among "libpq  -- PQsetClientEncoding()",
"SQL command  -- SET NAMES", and
For example: If we use PHP (>4.0.2),  which way is correct or mostly correct?

1. pg_setclientencoding($cid, "BIG5")
2. pg_exec("SET NAMES 'BIG5'")

Chih-Chang Hsieh

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-docs by date

Next:From: Tim KientzleDate: 2000-12-30 01:54:18
Subject: Re: MySQL and PostgreSQL speed compare
Previous:From: Gilles BernardDate: 2000-12-29 08:43:31
Subject: Postgres ignoring RTree for geometric operators

pgsql-hackers by date

Next:From: sergiopDate: 2000-12-29 19:58:02
Subject: Notify with Rules bugs?
Previous:From: Mikheev, VadimDate: 2000-12-29 18:54:00
Subject: RE: Assuming that TAS() will succeed the first time is verboten

pgsql-patches by date

Next:From: sergiopDate: 2000-12-29 19:58:02
Subject: Notify with Rules bugs?
Previous:From: Brent VernerDate: 2000-12-29 04:58:13
Subject: Re: Alpha tas() patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group