Re: Reg:Connection Object - Mailing list pgsql-admin

From Manikandan C
Subject Re: Reg:Connection Object
Date
Msg-id B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com
Whole thread Raw
In response to Reg:Connection Object  ("sandhya" <sandhyar@amiindia.co.in>)
List pgsql-admin
I hope, U can have a structure that have members as the "user name" and the "Connection object". Whenever a new
connectionis made, U can create instances of this structure. Based on the user name, you can pass the appropriate
instanceto the function. 

Hope this will help you.
Is this what you want?

Regards,
Mani

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Michael Fuhr
Sent: Friday, September 02, 2005 11:29 AM
To: sandhya
Cc: Askar Zaidi; postgre
Subject: Re: [ADMIN] Reg:Connection Object


On Fri, Sep 02, 2005 at 11:19:53AM +0530, sandhya wrote:
> In case of multiple users what will happen?
> Each must have different connection objects right!

That's why global variables are bad.  But what's wrong with passing
a PGconn * to various functions?  If that's a problem in your
application then please explain why; it's still not clear what
difficulties you're having.  Perhaps it would help if you posted a
simple but complete example program that shows what you're trying
to do.

As I mentioned before, this thread is off-topic for pgsql-admin;
it would be more appropriate in pgsql-interfaces or pgsql-general.

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

pgsql-admin by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Reg:Connection Object
Next
From: Tom Lane
Date:
Subject: Re: pg_dumpall problem - duplicated users