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 BAD98D6F3A for ; Fri, 2 Sep 2005 02:42:55 -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 57581-02 for ; Fri, 2 Sep 2005 05:42:50 +0000 (GMT) Received: from venus.amiindia.co.in (unknown [203.199.198.234]) by svr1.postgresql.org (Postfix) with ESMTP id DFDE2D6E15 for ; Fri, 2 Sep 2005 02:42:45 -0300 (ADT) Received: from amiindiahjwbgh ([10.0.0.205]) (authenticated bits=0) by venus.amiindia.co.in (8.12.10/8.12.11) with ESMTP id j825eZPA015514; Fri, 2 Sep 2005 11:10:35 +0530 Message-ID: <005901c5af82$23e95270$cd00000a@amiindiahjwbgh> From: "sandhya" To: "Michael Fuhr" Cc: "Askar Zaidi" , "postgre" References: <01ad01c5aee1$dd839570$cd00000a@amiindiahjwbgh> <20050901134633.GA27624@winnie.fuhr.org> <003501c5af76$78257690$cd00000a@amiindiahjwbgh> <20050902051613.GB59734@winnie.fuhr.org> Subject: Re: Reg:Connection Object Date: Fri, 2 Sep 2005 11:19:53 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.049 required=5 tests=[AWL=-0.001, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/12 X-Sequence-Number: 18749 In case of multiple users what will happen? Each must have different connection objects right! ----- Original Message ----- From: "Michael Fuhr" To: "sandhya" Cc: "Askar Zaidi" ; "postgre" 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