Thread

  1. Hello PL/Python

    Karel Zak <zakkr@zf.jcu.cz> — 2000-07-19T15:24:46Z

    
     Today afternoon I a little study libpython1.5 and I mean create
    new PL language is not a problem.
    
     I a little play with it, and here is effect:
    
    test=# CREATE FUNCTION py_test() RETURNS text AS '
    test'# a = ''Hello '';
    test'# b = ''PL/Python'';
    test'# plpython.retval( a + b );
    test'# ' LANGUAGE 'plpython';
    CREATE
    test=#
    test=#
    test=# SELECT py_test();
         py_test
    -----------------
     Hello PL/Python
    (1 row)
    
    
     Comments? Works on this already anyone?
    
    				Karel
    
    
    PS. I'am not Python guru, I love 'C' and good shared libs only :-)
    
    
    
  2. Re: Hello PL/Python

    Hannu Krosing <hannu@tm.ee> — 2000-07-20T09:30:54Z

    Karel Zak wrote:
    > 
    >  Today afternoon I a little study libpython1.5 and I mean create
    > new PL language is not a problem.
    > 
    >  I a little play with it, and here is effect:
    > 
    > test=# CREATE FUNCTION py_test() RETURNS text AS '
    > test'# a = ''Hello '';
    > test'# b = ''PL/Python'';
    > test'# plpython.retval( a + b );
    > test'# ' LANGUAGE 'plpython';
    > CREATE
    > test=#
    > test=#
    > test=# SELECT py_test();
    >      py_test
    > -----------------
    >  Hello PL/Python
    > (1 row)
    > 
    >  Comments? Works on this already anyone?
    
    There is a semi-complete implementation (i.e. no trigger procedures) 
    by Vello Kadarpik (vello@pyystel.ee).
    
    He is probably waiting for fmgr redesign or somesuch to complete before 
    releasing it.
    
    ---------
    Hannu
    
    
  3. Re: Hello PL/Python

    Karel Zak <zakkr@zf.jcu.cz> — 2000-07-20T10:40:04Z

    > >  Comments? Works on this already anyone?
    > 
    > There is a semi-complete implementation (i.e. no trigger procedures) 
    > by Vello Kadarpik (vello@pyystel.ee).
    
     Cool! Is anywhere available this implementation?
    
    Thanks.
    
    			Karel
    
    
    
  4. Re: Hello PL/Python

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-07-20T14:58:43Z

    Hannu Krosing <hannu@tm.ee> writes:
    > There is a semi-complete implementation (i.e. no trigger procedures) 
    > by Vello Kadarpik (vello@pyystel.ee).
    
    > He is probably waiting for fmgr redesign or somesuch to complete before 
    > releasing it.
    
    fmgr redesign is done as far as PL language handlers need be concerned.
    I still have to turn the crank on converting individual old-style
    functions to new-style (about half of the builtin functions are done
    so far ... man, we have got a lot of them ...).  But PL and trigger
    handlers were done a couple months ago.
    
    			regards, tom lane
    
    
  5. Re: Hello PL/Python

    Jan Wieck <janwieck@t-online.de> — 2000-07-20T15:39:14Z

    Tom Lane wrote:
    > Hannu Krosing <hannu@tm.ee> writes:
    > > There is a semi-complete implementation (i.e. no trigger procedures)
    > > by Vello Kadarpik (vello@pyystel.ee).
    >
    > > He is probably waiting for fmgr redesign or somesuch to complete before
    > > releasing it.
    >
    > fmgr redesign is done as far as PL language handlers need be concerned.
    > I still have to turn the crank on converting individual old-style
    > functions to new-style (about half of the builtin functions are done
    > so far ... man, we have got a lot of them ...).  But PL and trigger
    > handlers were done a couple months ago.
    
        PL/pgSQL   (what  you  did)  and  PL/Tcl  (done  lately)  are
        converted to the new FMGR NULL-capabilities.
    
        Dunno about PL/Perl.
    
    
    Jan
    
    --
    
    #======================================================================#
    # It's easier to get forgiveness for being wrong than for being right. #
    # Let's break this rule - forgive me.                                  #
    #================================================== JanWieck@Yahoo.com #
    
    
    
    
  6. Re: Hello PL/Python

    Hannu Krosing <hannu@tm.ee> — 2000-07-21T11:40:03Z

    Tom Lane wrote:
    > 
    > Hannu Krosing <hannu@tm.ee> writes:
    > > There is a semi-complete implementation (i.e. no trigger procedures)
    > > by Vello Kadarpik (vello@pyystel.ee).
    > 
    > > He is probably waiting for fmgr redesign or somesuch to complete before
    > > releasing it.
    > 
    > fmgr redesign is done as far as PL language handlers need be concerned.
    > I still have to turn the crank on converting individual old-style
    > functions to new-style (about half of the builtin functions are done
    > so far ... man, we have got a lot of them ...).  But PL and trigger
    > handlers were done a couple months ago.
    
    Is some documentation available or just the source ?
    
    Is the -fmgr mailing-list actually there ? 
    I got some cryptic messages when I tried to subscribe a while ago.
    
    ----------
    Hannu
    
    
  7. Re: Hello PL/Python

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-07-21T14:10:18Z

    Hannu Krosing <hannu@tm.ee> writes:
    > Tom Lane wrote:
    >> fmgr redesign is done as far as PL language handlers need be concerned.
    
    > Is some documentation available or just the source ?
    
    src/backend/utils/fmgr/README is all there is at the moment.  Updating
    the SGML docs is still on the to-do list.
    
    > Is the -fmgr mailing-list actually there ? 
    
    Darn if I know.  I'm not on it ...
    
    			regards, tom lane
    
    
  8. Re: Hello PL/Python

    Marc G. Fournier <scrappy@hub.org> — 2000-07-22T12:50:45Z

    On Fri, 21 Jul 2000, Tom Lane wrote:
    
    > Hannu Krosing <hannu@tm.ee> writes:
    > > Tom Lane wrote:
    > >> fmgr redesign is done as far as PL language handlers need be concerned.
    > 
    > > Is some documentation available or just the source ?
    > 
    > src/backend/utils/fmgr/README is all there is at the moment.  Updating
    > the SGML docs is still on the to-do list.
    > 
    > > Is the -fmgr mailing-list actually there ? 
    > 
    > Darn if I know.  I'm not on it ...
    
    it is actually there ... the only one of the new ones that has been seeing
    any traffic, though, is the -oo one ...
    
    
    
    
  9. Re: Hello PL/Python

    Bruce Momjian <pgman@candle.pha.pa.us> — 2000-07-27T03:43:16Z

    > > handlers were done a couple months ago.
    > 
    >     PL/pgSQL   (what  you  did)  and  PL/Tcl  (done  lately)  are
    >     converted to the new FMGR NULL-capabilities.
    > 
    >     Dunno about PL/Perl.
    
    I don't think anyone knows about PL/Perl.  :-)  (It is broken on many
    platforms.)
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  10. Re: Hello PL/Python

    alex@pilosoft.com — 2000-07-27T03:54:33Z

    On Wed, 26 Jul 2000, Bruce Momjian wrote:
    
    > > > handlers were done a couple months ago.
    > > 
    > >     PL/pgSQL   (what  you  did)  and  PL/Tcl  (done  lately)  are
    > >     converted to the new FMGR NULL-capabilities.
    > > 
    > >     Dunno about PL/Perl.
    > 
    > I don't think anyone knows about PL/Perl.  :-)  (It is broken on many
    > platforms.)
    
    I believe that plperl failures are related to building perl as a shared
    library which isn't done in many platforms. PL/Perl by itself seems pretty
    darn stable to me.
    
    Now, when PL/Perl will have some sort of SPI interface...That'd rock ;)
    My idea was to implement SPI as a DBD driver, such as DBD::PgSPI, but I
    don't have time to implement it...
    
    -alex