[EMAIL PROTECTED] 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 used has 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. + ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend