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

From Jaime Casanova
Subject Re: Determining client_encoding from client locale
Date
Msg-id 3073cc9b0907231145o28c67cc4q71eaf2d3871114f1@mail.gmail.com
Whole thread Raw
In response to Re: Determining client_encoding from client locale  (Peter Eisentraut <peter_e@gmx.net>)
List 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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: join regression failure on cygwin
Next
From: Bernd Helmle
Date:
Subject: Re: mixed, named notation support