From: Michael Fuhr <mike@fuhr.org>
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: Thu, 1 Sep 2005 23:16:13 -0600
Message-ID: <20050902051613.GB59734@winnie.fuhr.org> (raw)
In-Reply-To: <003501c5af76$78257690$cd00000a@amiindiahjwbgh>
References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh>
<20050901134633.GA27624@winnie.fuhr.org>
<003501c5af76$78257690$cd00000a@amiindiahjwbgh>
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
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: mike@fuhr.org, sandhyar@amiindia.co.in, askar@mail.nplindia.ernet.in
Subject: Re: Reg:Connection Object
In-Reply-To: <20050902051613.GB59734@winnie.fuhr.org>
References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh> <20050901134633.GA27624@winnie.fuhr.org> <003501c5af76$78257690$cd00000a@amiindiahjwbgh> <20050902051613.GB59734@winnie.fuhr.org>
* 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