pg.ddx.io  pgsql-students@postgresql.org mailing list archive  
help / color / mirror / Atom feed
EC2 with Postgresql
2+ messages / 2 participants
[nested] [flat]

* EC2 with Postgresql
@ 2008-07-16 20:47  Kunal Gupta <kunalgupta.colostate@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kunal Gupta @ 2008-07-16 20:47 UTC (permalink / raw)
  To: 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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: EC2 with Postgresql
@ 2008-07-16 22:42  Robert Treat <xzilla@users.sourceforge.net>
  parent: Kunal Gupta <kunalgupta.colostate@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Treat @ 2008-07-16 22:42 UTC (permalink / raw)
  To: pgsql-students; +Cc: Kunal Gupta <kunalgupta.colostate@gmail.com>

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-07-16 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16 20:47 EC2 with Postgresql Kunal Gupta <kunalgupta.colostate@gmail.com>
2008-07-16 22:42 ` Robert Treat <xzilla@users.sourceforge.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox