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

Re: [HACKERS] library policy question

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: (view raw, whole thread or download thread mbox)
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 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!

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-03-08 16:15:56
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Previous:From: Thomas LockhartDate: 2000-03-08 14:06:35
Subject: Re: [HACKERS] library policy question

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