libpq + multiple connections ... - Mailing list pgsql-interfaces

From The Hermit Hacker
Subject libpq + multiple connections ...
Date
Msg-id Pine.BSF.4.21.9911290300471.68617-100000@thelab.hub.org
Whole thread Raw
Responses Re: [INTERFACES] libpq + multiple connections ...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Anyone able to comment on this?  I haven' tused libpq in so long that I
can't :(

======

Hmm, sorta, I'm a bit troubled, I was trying to add an async connection
function to libpq and I stumbled across some problems.

It seems that libpq makes use of some static variables, meaning i'm not
sure if it's safe to use libpq for multiple database connections.

What i'm refering to is:

postgresql-6.5.3/src/interfaces/libpq/fe-connect.c

line 79 has a structure that seems to be shared amongst the entire
library, am I likely to stumble upon more stuff that makes it somewhat
dangerous to have more than one active database connection in my program?

=======

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [INTERFACES] ERROR: cannot find attribute 1 of relation pg_temp.460.0
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] libpq + multiple connections ...