| From: | Michael Meskes <meskes(at)postgreSQL(dot)org> | 
|---|---|
| To: | PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org> | 
| Subject: | Re: [HACKERS] library policy question | 
| Date: | 2000-03-08 15:30:10 | 
| Message-ID: | 20000308163010.A512@fam-meskes.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, Mar 07, 2000 at 11:34:04AM -0500, Tom Lane wrote:
> > What exactly is our policy towards global variables in libraries?
> 
> Avoid them.
Maybe I've got a brain lock for the moment but what do I do to the list of
connections I have to handle? Since it is used in several functions I cannot
see how to program this without a global variable albeit a static one. What
I need is a mapping of the SQL conenction name to the PGconn structure.
I also wonder if multiple threads should be allowed access to the same
structure, i.e. if one thread opens a new connection should the other one be
allowed to access this too?
BTW libpgeasy does not seem to be able to be used in multi-threading
environments either. Is this library still supported?
Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De           | Use PostgreSQL!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2000-03-08 16:15:56 | Re: [HACKERS] DROP TABLE inside a transaction block | 
| Previous Message | Thomas Lockhart | 2000-03-08 14:06:35 | Re: [HACKERS] library policy question |