Skip site navigation (1) Skip section navigation (2)

libpq + multiple connections ...

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq + multiple connections ...
Date: 1999-11-29 07:01:34
Message-ID: Pine.BSF.4.21.9911290300471.68617-100000@thelab.hub.org (view raw or flat)
Thread:
Lists: 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(at)hub(dot)org           secondary: scrappy(at){freebsd|postgresql}.org 


Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 1999-11-29 07:45:12
Subject: Re: [INTERFACES] libpq + multiple connections ...
Previous:From: Tom LaneDate: 1999-11-28 23:45:26
Subject: Re: [INTERFACES] ERROR: cannot find attribute 1 of relation pg_temp.460.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group