Re: Determining client_encoding from client locale
Jaime Casanova <jcasanov@systemguards.com.ec>
From: Jaime Casanova <jcasanov@systemguards.com.ec>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@commandprompt.com>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Bruce Momjian <bruce@momjian.us>, Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Date: 2009-07-23T18:45:00Z
Lists: pgsql-hackers
On Thu, Jul 23, 2009 at 1:24 PM, Peter Eisentraut<peter_e@gmx.net> wrote: > > Which proves my point, because libpgport includes chkconfig.c. But this is > just a workaround. > yeah! actually the problem i had was because we need to add the -lpgport to use pg_get_encoding_from_locale and that is something that this patch introduced the other unrelated problem i had is my little knowledge about the search path of libraries, the minimun i need to compile the test program with the correct libpq is this: gcc -o test-libpq test-libpq.o -Wl,-rpath,'/usr/local/pgsql/head/lib' -L /usr/local/pgsql/head/lib -lpq -lpgport so, at least, the second problem is a documentation one,our docs says: """ When linking the final program, specify the option -lpq so that the libpq library gets pulled in, as well as the option -Ldirectory to point the compiler to the directory where the libpq library resides. (Again, the compiler will search some directories by default.) For maximum portability, put the -L option before the -lpq option. For example: cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq """ which is clearly not accurate, we also need to add the -Wl,rpath stuff -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157