Re: [GENERAL] PLPythonu for production server

2016-03-05 Thread Rémi Cura
Thanks ! Cheers, Rémi-C 2016-03-05 0:38 GMT+01:00 Adrian Klaver : > On 03/04/2016 01:46 AM, Rémi Cura wrote: > >> Thanks for the answer guys. >> >> I should have mentionned that I had read the doc, >> and was looking for non explicit knowledge, >> like : >> - what is the reputation of plpython fo

Re: [GENERAL] PLPythonu for production server

2016-03-04 Thread Adrian Klaver
On 03/04/2016 01:46 AM, Rémi Cura wrote: Thanks for the answer guys. I should have mentionned that I had read the doc, and was looking for non explicit knowledge, like : - what is the reputation of plpython for a dba? - are there actual production system that use it - what would be the recommend

Re: [GENERAL] PLPythonu for production server

2016-03-04 Thread s d
On 4 March 2016 at 10:46, Rémi Cura wrote: > Thanks for the answer guys. > > I should have mentionned that I had read the doc, > and was looking for non explicit knowledge, > like : > - what is the reputation of plpython for a dba? > Dunno. - are there actual production system that use it > I

Re: [GENERAL] PLPythonu for production server

2016-03-04 Thread Rémi Cura
Thanks for the answer guys. I should have mentionned that I had read the doc, and was looking for non explicit knowledge, like : - what is the reputation of plpython for a dba? - are there actual production system that use it - what would be the recommended usage perimeter ? (only administration

Re: [GENERAL] PLPythonu for production server

2016-03-03 Thread David G. Johnston
On Thu, Mar 3, 2016 at 12:35 PM, Adrian Klaver wrote: > On 03/03/2016 10:09 AM, Rémi Cura wrote: > >> Hey List, >> >> would it be considered safe to use plpythonu for a production database? >> What would be the limitations/ dangers? >> > > They are explained here: > > http://www.postgresql.org/do

Re: [GENERAL] PLPythonu for production server

2016-03-03 Thread Adrian Klaver
On 03/03/2016 10:09 AM, Rémi Cura wrote: Hey List, would it be considered safe to use plpythonu for a production database? What would be the limitations/ dangers? They are explained here: http://www.postgresql.org/docs/9.5/interactive/plpython.html "PL/Python is only available as an "untrust

Re: [GENERAL] plpythonu memory leak

2011-01-18 Thread Daniel Popowich
I found the bug and it has been reported. Bug #5842. Details here: http://archives.postgresql.org/pgsql-bugs/2011-01/msg00134.php Dan Popowich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] plpythonu memory leak

2011-01-18 Thread Daniel Popowich
Alex Hunsaker writes: > FYI if I don't use a slice copy here I can't get it to leak. ( find my > test case at the end ) I don't know enough about python to know if > thats a pl/python issue or python doing what its told-- having never > really wrote any python myself. > > --- > -- le

Re: [GENERAL] plpythonu memory leak

2011-01-17 Thread Alex Hunsaker
On Fri, Jan 14, 2011 at 19:14, Daniel Popowich wrote: [ snip ] > CREATE FUNCTION pygaps(start_ts timestamp without time zone, end_ts timestamp > without time zone, gap_length interval) RETURNS SETOF timerange >    LANGUAGE plpythonu >    AS $$ > >    # because pg passes date/time to python as st

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
As an example of a filesystem access that is transaction dependent: When I create a new supplier in the database, I need a set of directories built on the file system. If the directories are not there, it will cause a lot of problems when dealing with this supplier. When creating the supplier, I us

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
>> Is there any good reason not to include this functionality directly in >> the database? (Too much parallel processing, engine not equipped for >> that kind of processing, threading issues...) >> >> > there are some issues still > > * missing integrated scheduler > * missing autonomous tran

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
On 6/1/2010 11:12 AM, Szymon Guz wrote: > > > 2010/6/1 Sim Zacks mailto:s...@compulab.co.il>> > > PG 8.2 > > I am using plpythonu to add application server functionality to my > postgresql database. > > For example, I have triggers and functions that FTP files, sends > email,

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Pavel Stehule
2010/6/1 Sim Zacks : > PG 8.2 > > I am using plpythonu to add application server functionality to my > postgresql database. > > For example, I have triggers and functions that FTP files, sends email, > processes files, etc.. > > > Is there any good reason not to include this functionality directly

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Szymon Guz
2010/6/1 Sim Zacks > PG 8.2 > > I am using plpythonu to add application server functionality to my > postgresql database. > > For example, I have triggers and functions that FTP files, sends email, > processes files, etc.. > > > Is there any good reason not to include this functionality directly

Re: [GENERAL] plpythonu

2008-01-20 Thread Alvaro Herrera
Sim Zacks wrote: > I'm a fan of unsecured languages in the database. > Obviously they should only be used by people who understand the difference. > I wouldn't want python locked down. > That would prevent so many different external functions that can now > be integrated into the database. > > Amon

Re: [GENERAL] plpythonu

2008-01-19 Thread Sim Zacks
I'm a fan of unsecured languages in the database. Obviously they should only be used by people who understand the difference. I wouldn't want python locked down. That would prevent so many different external functions that can now be integrated into the database. Among other things that I curren

Re: [GENERAL] plpythonu

2008-01-18 Thread Marko Kreen
On 1/18/08, Erik Jones <[EMAIL PROTECTED]> wrote: > On Jan 18, 2008, at 7:48 AM, Stuart Bishop wrote: > > plpython !=3D plpythonu. > > > > plpython was the 'secure' sandboxed version. The Python devs gave up > > supporting any sort of sandboxing feature in Python declaring it > > impossib= > > le.

Re: [GENERAL] plpythonu

2008-01-18 Thread Erik Jones
On Jan 18, 2008, at 7:48 AM, Stuart Bishop wrote: plpython !=3D plpythonu. plpython was the 'secure' sandboxed version. The Python devs gave up supporting any sort of sandboxing feature in Python declaring it impossib= le. Someone should definitely take a look at this: http:// sayspy.blo

Re: [GENERAL] plpythonu

2008-01-18 Thread Stuart Bishop
Alexandre da Silva wrote: > Hello, > someone can tell me if is secure to create external python modules and > import them to functions/procedures/triggers to use? Its fine as long as you trust the users with write access to your PYTHONP= ATH. > Another question is that I have read in some discuss

Re: [GENERAL] plpythonu and PYTHONPATH/sys.path

2007-03-06 Thread Korin Richmond
On Tue, 6 Mar 2007, Korin Richmond wrote: On Tue, 6 Mar 2007, Richard Huxton wrote: Korin Richmond wrote: Hi, I want to use python modules I have written in plpythonu. I can load these modules in functions within postgres if they are installed in the "official" python module directories (

Re: [GENERAL] plpythonu and PYTHONPATH/sys.path

2007-03-06 Thread Korin Richmond
On Tue, 6 Mar 2007, Richard Huxton wrote: Korin Richmond wrote: Hi, I want to use python modules I have written in plpythonu. I can load these modules in functions within postgres if they are installed in the "official" python module directories (e.g. /blah/site-packages etc.) However, I

Re: [GENERAL] plpythonu and PYTHONPATH/sys.path

2007-03-06 Thread Richard Huxton
Korin Richmond wrote: Hi, I want to use python modules I have written in plpythonu. I can load these modules in functions within postgres if they are installed in the "official" python module directories (e.g. /blah/site-packages etc.) However, I want to use modules which are in my home fil

Re: [GENERAL] plpythonu array parameter

2007-01-24 Thread _
Anyone interested in arrays and plpython might find this interesting. Based on the conversation below I put these functions in a library (pg_stuff.py): def arr2list(a): a = a.replace("{","[").replace("}","]") pylist = eval(a) return pylist def list2arr(a): parm = `a` parm=parm

Re: [GENERAL] plpythonu and return void

2005-08-09 Thread Adrian Klaver
On Monday 08 August 2005 08:02 pm, Tom Lane wrote: > Adrian Klaver <[EMAIL PROTECTED]> writes: > > I recently migrated a database from Postgres 7.4.1 to Postgres 8.03. The > > only problem I have run into is that a plpythonu function that returns > > void will not run under 8.03. The error message

Re: [GENERAL] plpythonu and return void

2005-08-08 Thread Tom Lane
Adrian Klaver <[EMAIL PROTECTED]> writes: > I recently migrated a database from Postgres 7.4.1 to Postgres 8.03. The only > problem I have run into is that a plpythonu function that returns void will > not run under 8.03. The error message states that a plpython function cannot > return void. I g

Re: [GENERAL] plpythonu and bytea

2005-07-02 Thread Michael Fuhr
On Sat, Jul 02, 2005 at 04:49:23PM -0400, Greg Steffensen wrote: > > Hey, I'm trying to write some plpython procedures that read binary data from > images on the disk and store it in bytea fields. I'm basically trying to > write a plpython procedure that accepts a varchar and returns a bytea, wit

Re: [GENERAL] plpythonu and dollar quoting

2005-05-03 Thread Michael Fuhr
On Tue, May 03, 2005 at 02:46:04PM -0700, CSN wrote: > > Can dollar quoting be used with plpythonu (like with plperl - Yes, if you're using PostgreSQL 8.0 or later. Dollar quotes have nothing to do with the function's language -- they're just another way to quote a string. http://www.postgresql.

Re: [GENERAL] plpythonu and dollar quoting

2005-05-03 Thread CSN
Nevermind, I see dollar-quoting was added in 8.0. --- CSN <[EMAIL PROTECTED]> wrote: > Can dollar quoting be used with plpythonu (like with > plperl - > http://www.postgresql.org/docs/8.0/interactive/plperl.html#PLPERL-FUNCS)? > When trying to create a function I get this error: > > 'syntax err

Re: [GENERAL] plpythonu on 7.4

2005-01-21 Thread Michael Fuhr
On Sat, Jan 22, 2005 at 12:57:37AM -0500, Tom Lane wrote: > [EMAIL PROTECTED] (elein) writes: > > createlang -U postgres 'plpythonu' template1 > > createlang: language installation failed: ERROR: could not load > > library "/usr/local/pgsql74/lib/plpython.so": > > /usr/local/pgsql74/lib/plpyth

Re: [GENERAL] plpythonu on 7.4

2005-01-21 Thread Tom Lane
[EMAIL PROTECTED] (elein) writes: > createlang -U postgres 'plpythonu' template1 > createlang: language installation failed: ERROR: could not load > library "/usr/local/pgsql74/lib/plpython.so": > /usr/local/pgsql74/lib/plpython.so: undefined symbol: PyDict_Copy I'd bet on a python version is

Re: [GENERAL] plpythonu on 7.4

2005-01-21 Thread Mike G.
Is this on fedora or redhat linux? If so a separate rpm must be installed for plpython to function. If you built from source the config script must also include building python. On Fri, Jan 21, 2005 at 10:34:51PM -0700, Michael Fuhr wrote: > On Fri, Jan 21, 2005 at 09:16:27PM -0800, elein wr

Re: [GENERAL] plpythonu on 7.4

2005-01-21 Thread Michael Fuhr
On Fri, Jan 21, 2005 at 09:16:27PM -0800, elein wrote: > createlang: language installation failed: ERROR: could not load > library "/usr/local/pgsql74/lib/plpython.so": > /usr/local/pgsql74/lib/plpython.so: undefined symbol: PyDict_Copy What does "ldd /usr/local/pgsql74/lib/plpython.so" show?