An extension which allows one to write Python-based triggers and functions inside of the PostgreSQL RDBMS. Use this tag for questions about PostgreSQL's PL/Python Procedural Language.

learn more… | top users | synonyms

1
vote
0answers
18 views

pypl store function to update a record is not working

I am using PostgreSQL 9.4.7 and Python 2.7.6. I am writing a plpython function to update a row in user table and my code is as below: CREATE FUNCTION update_user(myid int, mymail text, myname text) ...
6
votes
1answer
1k views

Why is PL/Python untrusted?

According to the docs: PL/Python is only available as an "untrusted" language, meaning it does not offer any way of restricting what users can do in it and is therefore named plpythonu. A trusted ...
0
votes
1answer
34 views

plpy.execute('…') statements not in logs

How can I get the SQL statements executed by plyp into the postgres log files? CREATE FUNCTION history_monitor() RETURNS trigger LANGUAGE plpythonu AS $_$ ... plpy.execute('...') $_$; ...
0
votes
0answers
49 views

What role for plpythonu function's in the file system?

As a preliminary test for a further work I'm trying to use a simple plpythonu function in Postgresql 9.2 to create a folder in my filesystem. So I have this code : CREATE OR REPLACE FUNCTION ...
1
vote
0answers
32 views

Require Language In PostgreSQL Extension Control File

I'm developing a custom extension that uses plpythonu in several functions. I'd like to be able to require that plpythonu be installed in order to create my extension, but I don't see anything in the ...
3
votes
1answer
78 views

Custom modules for plpythonu

I'm writing a series of plpythonu functions which share a few common bits of code. I'd like to package the shared code into a separate module for ease of maintenance. Is there an easy way to call my ...
1
vote
1answer
136 views

How to return multiple columns (each a composite type) in plpythonu

I have created a plpythonu function that should return a table with multiple columns. At present, it returns a single column with multiple components. I came across this answer which is A) a little ...
1
vote
1answer
147 views

How to use language PL/PythonU on a PostgreSQL database via phpPgAdmin?

I am used to PgAdmin III where I can simply create python functions like the following on a PostgreSQL database: CREATE OR REPLACE FUNCTION pyHello (x integer) RETURNS void AS $$ if x == 1: ...
6
votes
3answers
1k views

PostgreSQL procedural languages overhead (plpython / plsql / pllua…)

I'm trying to find information about PostgreSQL user defined functions in procedural languages performance for real time tasks. How does they compare to builtin functions? Is there any difference ...
2
votes
1answer
2k views

Cannot `create function` in plpython3u, permission denied

As postgres user, I have create extension plpython3u; in my database then I have set the plpython3u to trusted: select lanpltrusted from pg_language where lanname like 'plpython3u'; returns true but ...