pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Manikandan C <manikandanc@pervasive-postgres.com>
To: sandhya <sandhyar@amiindia.co.in>
Cc: Askar Zaidi <askar@mail.nplindia.ernet.in>
Cc: postgre <pgsql-admin@postgresql.org>
Subject: Re: Reg:Connection Object
Date: Fri, 2 Sep 2005 13:27:06 +0530
Message-ID: <B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com> (raw)


I hope, U can have a structure that have members as the "user name" and the "Connection object". Whenever a new connection is made, U can create instances of this structure. Based on the user name, you can pass the appropriate instance to 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



view thread (7+ messages)

Message-ID: <B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com>
Permalink:  ../B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com/
Also on:    postgresql.org/message-id/B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: manikandanc@pervasive-postgres.com, sandhyar@amiindia.co.in, askar@mail.nplindia.ernet.in
  Subject: Re: Reg:Connection Object
  In-Reply-To: <B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com>
  References: <B4AF8C04F762D246A1E38EC5DFAEFC0B223234@blrmail2.aus.pervasive.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox