Unix Technical Forum

plpython sets

This is a discussion on plpython sets within the pgsql Hackers forums, part of the PostgreSQL category; --> Hello all, I'm working with pl/python and I'd like to use the set returning function feature. I'm not working ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 03:30 AM
Matteo Bertini
 
Posts: n/a
Default plpython sets

Hello all,
I'm working with pl/python and I'd like to use the set returning
function feature.

I'm not working in a debug python, so the iterator bug is not a problem me.

Can someone point me to some plpython.c "setof" enabled sources?

Hint to build them in an ubuntu dapper environment are welcome too :-P !

Thanks a lot every developer involved in postgres!
PL/setyourlanguagehere is fantastic!

Matteo Bertini


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 03:30 AM
Tino Wildenhain
 
Posts: n/a
Default Re: plpython sets

Matteo Bertini wrote:
> Hello all,
> I'm working with pl/python and I'd like to use the set returning
> function feature.
>
> I'm not working in a debug python, so the iterator bug is not a problem me.
>
> Can someone point me to some plpython.c "setof" enabled sources?
>
> Hint to build them in an ubuntu dapper environment are welcome too :-P !
>
> Thanks a lot every developer involved in postgres!
> PL/setyourlanguagehere is fantastic!



http://python.projects.postgresql.org/

This works very well for me - although it needs some more
finish (docs and so on) maybe if more people using it
it can get better.

SRF - even lazy ones (e.g. generators) work nicely there.


Regards
Tino Wildenhain

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 03:30 AM
Hannu Krosing
 
Posts: n/a
Default Re: plpython sets

Ühel kenal päeval, E, 2006-07-17 kell 22:54, kirjutas Tino Wildenhain:
> Matteo Bertini wrote:
> > Hello all,
> > I'm working with pl/python and I'd like to use the set returning
> > function feature.
> >
> > I'm not working in a debug python, so the iterator bug is not a problem me.
> >
> > Can someone point me to some plpython.c "setof" enabled sources?
> >
> > Hint to build them in an ubuntu dapper environment are welcome too :-P !
> >
> > Thanks a lot every developer involved in postgres!
> > PL/setyourlanguagehere is fantastic!

>
>
> http://python.projects.postgresql.org/
>
> This works very well for me - although it needs some more
> finish (docs and so on) maybe if more people using it
> it can get better.
>
> SRF - even lazy ones (e.g. generators) work nicely there.


We at Skype or more precisely Sven Suursoho , has added these to the
version of plpython in the core and they will be available in 8.2.

Code for 8.0 and 8.1 will be available on request, and soon also from
https://developer.skype.com/


Enchancements added are:

* named parameters (args[] still valid)
* returning composite types (dict, tuple, list, class)
* returning SETOF as any iterable object (list, tuple, iterator,
generator)

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 03:31 AM
Matteo Bertini
 
Posts: n/a
Default Re: plpython sets

Tino Wildenhain ha scritto:
> http://python.projects.postgresql.org/
> This works very well for me - although it needs some more
> finish (docs and so on) maybe if more people using it
> it can get better.
>
> SRF - even lazy ones (e.g. generators) work nicely there.
>
>
> Regards
> Tino Wildenhain
>
>

eheh... I wasn't able to build it...

In the meantime some guy in the list provided me a "setof" enabled
plpython.c. Now built and working fine!

Do someone know why the back-end effort is duplicated?

Thanks,
Matteo Bertini


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 03:32 AM
Hannu Krosing
 
Posts: n/a
Default Re: plpython sets

Ühel kenal päeval, E, 2006-07-17 kell 23:22, kirjutas Matteo Bertini:
> Tino Wildenhain ha scritto:
> > http://python.projects.postgresql.org/
> > This works very well for me - although it needs some more
> > finish (docs and so on) maybe if more people using it
> > it can get better.
> >
> > SRF - even lazy ones (e.g. generators) work nicely there.
> >
> >
> > Regards
> > Tino Wildenhain
> >
> >

> eheh... I wasn't able to build it...
>
> In the meantime some guy in the list provided me a "setof" enabled
> plpython.c. Now built and working fine!
>
> Do someone know why the back-end effort is duplicated?


http://python.projects.postgresql.org/ seems to be aiming at a much
larger python/postgres integration scheme than src/pl/python.

and it has taken a different and more pythonic approach at many places
which is nice but takes a lot longer to mature.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com