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 85EE7D7672 for ; Fri, 2 Sep 2005 04:57:15 -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 54486-05 for ; Fri, 2 Sep 2005 07:57:12 +0000 (GMT) Received: from ausimss.pervasive.com (ausimss.pervasive.com [66.45.103.246]) by svr1.postgresql.org (Postfix) with ESMTP id 08756D7384 for ; Fri, 2 Sep 2005 04:57:10 -0300 (ADT) Received: from ausbayes2.aus.pervasive.com ([172.16.8.6]) by ausimss.pervasive.com with InterScan Messaging Security Suite; Fri, 02 Sep 2005 02:57:09 -0500 Received: from blrmail2.aus.pervasive.com ([10.3.16.65]) by ausbayes2.aus.pervasive.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 2 Sep 2005 02:57:08 -0500 Content-class: urn:content-classes:message Subject: Re: Reg:Connection Object MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 2 Sep 2005 13:27:06 +0530 Message-ID: X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Reg:Connection Object Thread-Index: AcWvhan6RcNVG3LlSwq9erwN75/XHwADtzow From: "Manikandan C" To: "sandhya" Cc: "Askar Zaidi" , "postgre" X-OriginalArrivalTime: 02 Sep 2005 07:57:08.0960 (UTC) FILETIME=[EB1E1E00:01C5AF93] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/14 X-Sequence-Number: 18751 I hope, U can have a structure that have members as the "user name" and = the "Connection object". Whenever a new connection is made, U can create = instances of this structure. Based on the user name, you can pass the = appropriate instance to the function. Hope this will help you. Is this what you want? Regards, Mani -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Michael Fuhr Sent: Friday, September 02, 2005 11:29 AM To: sandhya Cc: Askar Zaidi; postgre Subject: Re: [ADMIN] Reg:Connection Object On Fri, Sep 02, 2005 at 11:19:53AM +0530, sandhya wrote: > In case of multiple users what will happen? > Each must have different connection objects right! That's why global variables are bad. But what's wrong with passing a PGconn * to various functions? If that's a problem in your application then please explain why; it's still not clear what difficulties you're having. Perhaps it would help if you posted a simple but complete example program that shows what you're trying to do. As I mentioned before, this thread is off-topic for pgsql-admin; it would be more appropriate in pgsql-interfaces or pgsql-general. --=20 Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster