Re: Reg:Connection Object

From: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: "Askar Zaidi" <askar(at)mail(dot)nplindia(dot)ernet(dot)in>, "postgre" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Reg:Connection Object
Date: 2005-09-02 05:49:53
Message-ID: 005901c5af82$23e95270$cd00000a@amiindiahjwbgh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

In case of multiple users what will happen?
Each must have different connection objects right!

----- Original Message -----
From: "Michael Fuhr" <mike(at)fuhr(dot)org>
To: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
Cc: "Askar Zaidi" <askar(at)mail(dot)nplindia(dot)ernet(dot)in>; "postgre"
<pgsql-admin(at)postgresql(dot)org>
Sent: Friday, September 02, 2005 10:46 AM
Subject: Re: [ADMIN] Reg:Connection Object

> On Fri, Sep 02, 2005 at 09:56:19AM +0530, sandhya wrote:
> > I am using normal C-Functions,In one function i will make connection
with
> > the database.This connection object i need to get in my all other
functions
> > where i will do the other operations like creating a table ,altering a
table
> > in their respective functions.So..There is no need for me to ask the
user to
> > pass the user ,password,database name in all other functions.Pls suggest
me
>
> Do you mean you're writing C code using libpq? If so, why can't
> you just pass the PGconn * as another argument to your functions?
> Or use a global variable (although some programmers would consider
> that bad style)? It's not clear what difficulties you're having.
>
> --
> Michael Fuhr

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Fuhr 2005-09-02 05:58:55 Re: Reg:Connection Object
Previous Message Michael Fuhr 2005-09-02 05:16:13 Re: Reg:Connection Object