Re: [GENERAL] Querying libpq compile time options

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [GENERAL] Querying libpq compile time options
Дата
Msg-id 200605130038.k4D0c7L02838@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: [GENERAL] Querying libpq compile time options
Re: [GENERAL] Querying libpq compile time options
Список pgsql-hackers
spaminos-sql@yahoo.com wrote:
> Hi all
> 
> I am writing an app that uses libpq, but because it is threaded I want to make sure that the dynamic library being
usedhas been compiled with the right option.
 
> How do I do this?
> 
> Is there a call such as "bool PQisThreadSafe()" that I can call?

[ Email moved to hackers list.]

Good question.  This has come up a few times.  You can check if the
installation has threading with "pg_config --configure", and I though
there was a way to test at runtime, but looking I don't see anything.

Is this like detecting of libpq is SSL-enabled?  I see PQgetssl().  Do
we need to add a libpq function to return true/false for threading? 
Slony requires a threaded libpq, so it could do the test to prevent
wrong configurations.  It would be nice to enabled threading by default,
but it is like SSL in that not all operating systems support it.

--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: audit table containing Select statements submitted
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: DH_check return value test correct?