X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 74161D6E64 for ; Fri, 2 Sep 2005 02:27:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26332-04 for ; Fri, 2 Sep 2005 05:27:25 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 02B8AD6D8A for ; Fri, 2 Sep 2005 02:27:24 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j825OEWV028307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Sep 2005 23:27:18 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j825HDmC059825; Thu, 1 Sep 2005 23:17:13 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j825GDJ8059822; Thu, 1 Sep 2005 23:16:13 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 1 Sep 2005 23:16:13 -0600 From: Michael Fuhr To: sandhya Cc: Askar Zaidi , postgre Subject: Re: Reg:Connection Object Message-ID: <20050902051613.GB59734@winnie.fuhr.org> References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh> <20050901134633.GA27624@winnie.fuhr.org> <003501c5af76$78257690$cd00000a@amiindiahjwbgh> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003501c5af76$78257690$cd00000a@amiindiahjwbgh> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200509/11 X-Sequence-Number: 18748 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