pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sandhya <sandhyar@amiindia.co.in>
To: Michael Fuhr <mike@fuhr.org>
Cc: Askar Zaidi <askar@mail.nplindia.ernet.in>
Cc: postgre <pgsql-admin@postgresql.org>
Subject: Re: Reg:Connection Object
Date: Fri, 2 Sep 2005 11:19:53 +0530
Message-ID: <005901c5af82$23e95270$cd00000a@amiindiahjwbgh> (raw)
References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh>
	<20050901134633.GA27624@winnie.fuhr.org>
	<003501c5af76$78257690$cd00000a@amiindiahjwbgh>
	<20050902051613.GB59734@winnie.fuhr.org>

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


----- Original Message ----- 
From: "Michael Fuhr" <mike@fuhr.org>
To: "sandhya" <sandhyar@amiindia.co.in>
Cc: "Askar Zaidi" <askar@mail.nplindia.ernet.in>; "postgre"
<pgsql-admin@postgresql.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




view thread (7+ messages)  latest in thread

Message-ID: <005901c5af82$23e95270$cd00000a@amiindiahjwbgh>
Permalink:  ../005901c5af82$23e95270$cd00000a@amiindiahjwbgh/
Also on:    postgresql.org/message-id/005901c5af82$23e95270$cd00000a@amiindiahjwbgh

 · 

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: sandhyar@amiindia.co.in, mike@fuhr.org, askar@mail.nplindia.ernet.in
  Subject: Re: Reg:Connection Object
  In-Reply-To: <005901c5af82$23e95270$cd00000a@amiindiahjwbgh>
  References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh> <20050901134633.GA27624@winnie.fuhr.org> <003501c5af76$78257690$cd00000a@amiindiahjwbgh> <20050902051613.GB59734@winnie.fuhr.org> <005901c5af82$23e95270$cd00000a@amiindiahjwbgh>

* 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