Re: is libpq thread-safe? - Mailing list pgsql-general

From Alfred Perlstein
Subject Re: is libpq thread-safe?
Date
Msg-id 20001214132213.G4589@fw.wintelcom.net
Whole thread Raw
In response to is libpq thread-safe?  (npat@kmp.forthnet.gr)
List pgsql-general
* npat@kmp.forthnet.gr <npat@kmp.forthnet.gr> [001214 13:20] wrote:
> A staight forward question:
>
>    Is "libpq" thread-safe??
>
> And an elaboration:
>
>    I want to write a server that opens-up a number of connections
>    to a PostgreSQL database, and then spawns threads handing a connection
>    object (PGconn) to each thread, so that all the threads can
>    perform data-base operations (queries) simultaneously. Each thread will
>    use its own connection object. Will this work??

These are answered in the online docs.  Libpq is threadsafe with a
few exceptions, see the docs for functions you shouldn't call.

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."

pgsql-general by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: Re: Help!Can't connect Postgresql JDBC driver
Next
From: Jeff MacDonald
Date:
Subject: Re: Postgres demographics?