Re: Determining client_encoding from client locale - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Determining client_encoding from client locale
Date
Msg-id 4A8A9545.5040705@enterprisedb.com
Whole thread Raw
In response to Re: Determining client_encoding from client locale  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: Determining client_encoding from client locale  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-hackers
(I finally got a chance to get back to this...)

Jaime Casanova wrote:
> ok, attached a version that modifies src/interfaces/libpq/Makefile to
> push chklocale.o and eliminate the dependency on libpgport, this
> change also fixes the compile problem on windows

Thanks!

> still, i'm not sure this patch is doing anything useful... i
> initialized a cluster with utf8 and my system is using utf8 but when
> executing my test script with client_encoding=auto it gets SQL_ASCII
> 
> postgres@casanova1:~/pg_releases/pgtests$ locale
> LANG=es_EC.UTF-8
> LC_CTYPE="es_EC.UTF-8"
> LC_NUMERIC="es_EC.UTF-8"
> LC_TIME="es_EC.UTF-8"
> LC_COLLATE="es_EC.UTF-8"
> LC_MONETARY="es_EC.UTF-8"
> LC_MESSAGES="es_EC.UTF-8"
> LC_PAPER="es_EC.UTF-8"
> LC_NAME="es_EC.UTF-8"
> LC_ADDRESS="es_EC.UTF-8"
> LC_TELEPHONE="es_EC.UTF-8"
> LC_MEASUREMENT="es_EC.UTF-8"
> LC_IDENTIFICATION="es_EC.UTF-8"
> LC_ALL=
> postgres@casanova1:~/pg_releases/pgtests$ ./test-libpq
> 'dbname=postgres port=54329 client_encoding=auto'
> client_encoding: SQL_ASCII
> 
> and when executing the same script compiled in windows i get an error,
> it doesn't recognize the client_encoding option...
> 
> $ ./test-libpq.exe "dbname=postgres user=postgres host=192.168.204.101
> port=54329 client_encoding=latin1"
> Connection to database failed: invalid connection option "client_encoding"

Hmm, are you sure you the right version of libpq is being loaded at
runtime? What does "ldd ./test-libpq" say?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: mahendra chavan
Date:
Subject: Index Selection Tool For PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Lazy Snapshots