Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2EC346501ED for ; Wed, 16 Jul 2008 19:43:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56893-07 for ; Wed, 16 Jul 2008 19:43:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vms173001pub.verizon.net (vms173001pub.verizon.net [206.46.173.1]) by postgresql.org (Postfix) with ESMTP id 519EA64FCEE for ; Wed, 16 Jul 2008 19:43:06 -0300 (ADT) Received: from ridley.home ([71.179.100.114]) by vms173001.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K4400754F3LQ91B@vms173001.mailsrvcs.net> for pgsql-students@postgresql.org; Wed, 16 Jul 2008 17:42:57 -0500 (CDT) Date: Wed, 16 Jul 2008 18:42:57 -0400 From: Robert Treat Subject: Re: EC2 with Postgresql In-reply-to: To: pgsql-students@postgresql.org Cc: "Kunal Gupta" Message-id: <200807161842.57481.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: User-Agent: KMail/1.9.9 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/3 X-Sequence-Number: 116 On Wednesday 16 July 2008 16:47:01 Kunal Gupta wrote: > Hi Guys, > > I have following challenges: > > - I am suppose to connect to amazon EC2 and get the various information. > > - For this I am suppose to create a function in plpythonu. > > - Problem: in create function if we write "import" statement then we can > refer to standard libraries, but here I have to import a class made by me. > > can anyone tell if I can write " import X " where X is a class code by me > and where to place this X class ---- this is while if am creating a > function in postgresql using plpythonu. > This shouldn't be any different than including your custom class in a normal python script, you just have to make sure postgres knows where to find the file and that it has read permissions on it. HTH. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL