Re: Determining client_encoding from client locale

Jaime Casanova <jcasanov@systemguards.com.ec>

From: Jaime Casanova <jcasanov@systemguards.com.ec>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>, Peter Eisentraut <peter_e@gmx.net>
Date: 2009-07-22T23:29:23Z
Lists: pgsql-hackers

Attachments

On Mon, Jul 6, 2009 at 10:00 AM, Heikki
Linnakangas<heikki.linnakangas@enterprisedb.com> wrote:
> Here's my first attempt at setting client_encoding automatically from
> locale.
>
> It adds a new conninfo parameter to libpq, "client_encoding". If set to
> "auto", libpq uses the encoding as returned by
> pg_get_encoding_from_locale(). Any other value is passed through to the
> server as is.
>

i was trying to test this and make a simple program based on the first
libpq example that only shows client_encoding

this little test compiles fine until i applied your patch :(

postgres@casanova1:~/pg_releases/pgtests$ gcc -o test-libpq
test-libpq.o -L/usr/local/pgsql/head/lib -lpq
/usr/local/pgsql/head/lib/libpq.so: undefined reference to
`pg_get_encoding_from_locale'
collect2: ld returned 1 exit status

just in case i attached the test program.

-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157