/* * Program to determine thread safety of PostgreSQL libraries. * * Save this file somewhere you can access it easily. You only need * user level access. Also, it assumes that libpq-fe.h can be found in * /usr/include/ * * Compile this program like so: * yoursys $ gcc pg-thread-test.c -o pg-thread-test -I/usr/include/ -lpq * * Then run it: * yoursys $ ./pg-thread-test */ #include #include int main() { if ( PQisthreadsafe() ) { printf("It's safe.\n"); } else { printf("It isn't safe!\n"); } }