EC2 with Postgresql

Lists: pgsql-students
From: "Kunal Gupta" <kunalgupta(dot)colostate(at)gmail(dot)com>
To: pgsql-students(at)postgresql(dot)org
Subject: EC2 with Postgresql
Date: 2008-07-16 20:47:01
Message-ID: f21494a50807161347o4642d56eq7f4b156ce7e32c4d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-students

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.

Thanks and regards,
Kunal


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-students(at)postgresql(dot)org
Cc: "Kunal Gupta" <kunalgupta(dot)colostate(at)gmail(dot)com>
Subject: Re: EC2 with Postgresql
Date: 2008-07-16 22:42:57
Message-ID: 200807161842.57481.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-students

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