Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

I'm trying to understand why plpython function has much bigger impact on transaction counter in Postgres than plpgSQL function. Below is example which uses 2 functions: Vesion with plpgSQL (each part ...
Michał Albrycht's user avatar
0 votes
1 answer
307 views

I have problem in Postgres 16.2 with plpython procedure and library tabulate. I created procedure: CREATE OR REPLACE PROCEDURE dpl.__test_tabulate() LANGUAGE plpython3u AS $plpy$ from tabulate import ...
Misudka's user avatar
2 votes
0 answers
653 views

When ever I try to create extension plpython3u ERROR: could not load library "C:/Program Files/PostgreSQL/14/lib/plpython3.dll": The specified module could not be found. This message shows ...
Mohamed Roshan's user avatar
0 votes
0 answers
140 views

I have a python function that works perfectly, but I need to pass it to plpython3u (don't ask me why, juniors only obey) python function: import cryptography.hazmat.primitives.serialization.pkcs12 ...
Guilherme Rodrigues's user avatar
0 votes
0 answers
269 views

I'm trying to use plpython3u with postgresql on windows 11, and I want to use the requests library to make http requests.. So I did this test function: CREATE OR REPLACE FUNCTION teste() ...
Guilherme Rodrigues's user avatar
0 votes
0 answers
835 views

Just so you understand my case: Recently I was trying to install plpython3u on postgresql 15, and with a lot of struggle I managed I set the python environment variables (both for system and user) and ...
Guilherme Rodrigues's user avatar
0 votes
0 answers
453 views

I'm trying to install the plpython3u extension in my postgresql with this command: CREATE EXTENSION plpython3u; mas eu recebo este erro: ERROR: could not load library "C:/Program Files/PostgreSQL/...
Guilherme Rodrigues's user avatar
0 votes
2 answers
162 views

I have a plpython trigger function and I'm trying to log something in it to better understand what it does, but I can't manage to print anything on the postgres log file. I have tried different level ...
k4ppa's user avatar
  • 4,747
1 vote
0 answers
349 views

I'm trying to work with plpython in postgresql So I run the command: CREATE EXTENSION plpython3u but I get the error: Erro SQL [58P01]: ERROR: could not load library "C:/Program Files/PostgreSQL/...
Guilherme Rodrigues's user avatar
2 votes
2 answers
384 views

I am developing a PostgreSQL Procedure using the plpython3u extension which let you use python procedural language into PostgreSQL. With the following code using plpy, I am able to retrive data form ...
Stavros Koureas's user avatar
1 vote
1 answer
110 views

I have a problem with the plpygis library for python. Whenever I'm trying to convert a plpygis Point type into its shapely counterpart, I get the following error: ERROR: plpygis.exceptions....
yarvis's user avatar
  • 125
1 vote
1 answer
359 views

I'm trying to use packages from an existing virtual environment within the plpython3u extension for PostgreSQL. I found and followed this tutorial, but it didn't work. Firstly, the configuration file ...
yarvis's user avatar
  • 125
0 votes
1 answer
2k views

I am working on a Python project and I have a requirement that whenever a row is inserted, updated, or deleted in a PostgreSQL table, the corresponding value should be updated in Redis. I am working ...
jps's user avatar
  • 1
1 vote
0 answers
78 views

I'd like to insert a row inside a "history" table whenever the original row gets modified (updated). I'd like to use original row's ID as a FOREIGN KEY for the history table. But this ID ...
winwin's user avatar
  • 2,124
2 votes
1 answer
196 views

I implement python function for for the following query and i get correct answer, but when i try to create functions in postgreSQL by using plpython3u extension, it doesn't have any error but still ...
Jaber's user avatar
  • 23
0 votes
0 answers
42 views

The below example demonstrates using dask delayed funtions (ref) from within postgres plpython while using "plpy.execute" (ref) to query the database. It returns an error: ERROR: ...
Shadi's user avatar
  • 10.4k
0 votes
1 answer
479 views

Is it possible to write postgres functions in pl/python on an azure hosted db? Postgres allows python, but I read that creating python functions requires superuser; however, I also read that azure ...
Peter Rilling's user avatar
0 votes
1 answer
85 views

I have the following table: create table test_table ( id serial primary key, store text, price int, id_2 text); insert into test_table (store, id_2, price) values ('a', '11', 100), ('...
matrs's user avatar
  • 332
1 vote
1 answer
220 views

When a PL/Python procedure is executed, the python code is executed by a Python interpreter. My question is, is the Python interpreter running as a separate process, or is it a shared library that ...
Adam Van Oijen's user avatar
0 votes
0 answers
177 views

I'm using postgres 14 for creating this function in Datagrip: CREATE EXTENSION plpython3u; CREATE OR REPLACE FUNCTION pymax (x integer, y integer) RETURNS integer AS $$ if x>y: ...
algorythms's user avatar
  • 1,595
1 vote
2 answers
411 views

I am using pl/python3u in postgres. In that environment I have imported pandas and networkx. I have created a simple function that builds a graph from information in the tables and it works ...
MikeB2019x's user avatar
  • 1,297
1 vote
0 answers
200 views

PL/Python, and specifically PL/Python 2, is a requirement for the MADlib extension - which appears to support Postgres 9.2+. I am using Postgres 12 on Ubuntu 20.04. Unfortunately, while I have ...
LanceRD's user avatar
  • 71
0 votes
0 answers
180 views

Environment: Debian 11 with pl_PL locale(ISO-8859-2) Postgresql 13 database created with ISO 8859-2 encoding Plpython3u(Python 3.9.2) A simple example of the problem: CREATE OR REPLACE FUNCTION ...
Zadieln's user avatar
0 votes
0 answers
264 views

I am facing problems in updating column values from the postgresql trigger function written in plpython3u using TD['new']. All the other statements before and after the TD['new'] assignments are ...
Ankur Ghoshal's user avatar
6 votes
1 answer
2k views

I have a postgres 11 database running on CentOS 7 and am trying to use PL/python, but need to point to a specific version of the python interpreter. I need to use python3.9 whereas it is using python3....
refriedjello's user avatar
1 vote
0 answers
606 views

There is no available package for postgres-plpython-12 https://packages.ubuntu.com/search?keywords=postgresql-plpython The psycopg2 library does not work with plpython3 (or does it)? psycopg2.errors....
Darren Weber's user avatar
  • 1,714
0 votes
2 answers
468 views

I'm on Version 6.6.14 of Greenplum and trying to enable python 3. When I try to enable it with this command: CREATE LANGUAGE plpython3u; I get the following error: ERROR: could not access file &...
user3399186's user avatar
1 vote
1 answer
230 views

The extension hstore_plpython3u is supposed to transform hstore to/from python dict as described in the docs, but doesn't seem to work. The hstore becomes a string (no transform seems to happen). Why, ...
Martin Sellergren's user avatar
2 votes
5 answers
10k views

I have added all of the details I could find, with all of the links, and there is no way to get plpython3u to work on Windows in PostgreSQL 13, it seems. OLD, since the accepted answer shows that v3.7....
questionto42's user avatar
  • 9,922
0 votes
1 answer
340 views

Note: I'm running Postgres 11.7 and Python 2.7.17. It appears that time.sleep() has 60 sec limit in plpythonu function. It works as expected up to 60 seconds. But if passed a value greater than 60 ...
JohnMudd's user avatar
  • 13.8k
0 votes
1 answer
760 views

I am using PostgreSQL 12.6, compiled by Visual C++ build 1914, 64-bit on Windows Server. And like to know how can I call RestFull API using python or perl in postgres. I am relatively new in call ...
Jay Mehta's user avatar
1 vote
0 answers
368 views

We are actually migrating db from oracle to postgres. We are using postgreSQL 11. So the packages are converted to procedures/functions accordingly. For global variables implementation we used the ...
Abhishek Vijendra's user avatar
0 votes
1 answer
165 views

I'm running Postgresql 9.4, and I'm confused about how it handles plpython imports, specifically regarding Decimal. First example: CREATE OR REPLACE FUNCTION devel.foo() RETURNS void AS $BODY$ def ...
Primordial_Hamster's user avatar
1 vote
1 answer
399 views

Objective: Creating a full text search engine using PostgreSQL FTS. Populating tsvector: I have a tsvector column. To populate tsvector column, I am executing a trigger which calls a procedure which ...
Kaushik Acharya's user avatar
2 votes
0 answers
318 views

I want to use plpython in postgresql's function. I installed Python3.9 and configured the path and some other configations, and I copied the python's dll into the pg directory (my server is windows ...
Jsy's user avatar
  • 53
1 vote
1 answer
1k views

I'm trying to upgrade a system from Postgresql 9.6 to Postgresql 13 using pg_upgrade shipped with Postgresql 13. This upgrade fails with the error: Your installation references loadable libraries ...
user3741134's user avatar
0 votes
1 answer
268 views

I have the following working code : CREATE EXTENSION IF NOT EXISTS plpython3u; UPDATE pg_language SET lanpltrusted = true WHERE lanname LIKE 'plpython3u'; CREATE OR REPLACE FUNCTION ...
Krophil's user avatar
  • 21
1 vote
1 answer
2k views

I managed to install the plpython3u extention. But when I try to use a function that uses the extension I get: ERROR: could not load library "C:/Program Files/PostgreSQL/12/lib/plpython3.dll&...
Leonel Mota's user avatar
1 vote
1 answer
1k views

First off , my question is posted after reading many other questions like this one Install PL/Python on Windows for PostgreSQL 12 and various trials of previous methods and comments. But I ve been ...
jiquvox's user avatar
  • 11
0 votes
1 answer
301 views

I am running a trigger function on INSERT/UPDATE that would create a new process that sends a post request to an api. on a Ubuntu + PostgresQL 12 docker container running I was able to get the new ...
Denis S Dujota's user avatar
0 votes
1 answer
534 views

I have a linux command that i want to run in following function: CREATE FUNCTION tarifador_func2() RETURNS TRIGGER LANGUAGE plsh AS $$ #!/bin/sh SET userid[] = // here i want to run linux command and ...
ankit's user avatar
  • 2,885
0 votes
1 answer
1k views

I'm trying to monitor a table in postgres database. I want to send every operation on this table (INSERT OR UPDATE OR DELETE) to a python tcp server. So I tried to follow this tutorial, but without ...
No name's user avatar
  • 355
3 votes
4 answers
7k views

I've been working on FHIR for a project and we are using PostgreSQL as a database. While reading docs, I've come to know about PL/Python and decided to give it a shot but I am unable to install the ...
Khizar Iqbal's user avatar
0 votes
1 answer
325 views

I get the below situation with PostgreSQL plpython3u function. I've recently added a environment variable to my shell startup file. The env | grep MY_VAR command returns MY_VAR=/path/. But when I run ...
jorge is not ai's user avatar
1 vote
2 answers
32k views

I'm trying to get the plpython3u language working in PostgreSQL 11 (I'm working on a Windows 10 machine). I was able to successfully install it using the following command. CREATE EXTENSION ...
Bilesh Ganguly's user avatar
0 votes
0 answers
93 views

I have a working postgres trigger for folder operations on local drives. I would like to move these operations to a network drive where K is a network drive: CREATE OR REPLACE FUNCTION "public"."...
Tamas Kosa's user avatar
1 vote
0 answers
68 views

How do I pass an array of text strings (phone numbers) as a parameter - recipients - to a python function, then translate it into a json payload? Simplified, the CREATE STATEMENT: CREATE OR REPLACE ...
DrLou's user avatar
  • 649
0 votes
1 answer
173 views

I have a procedural function (written in pl/python) which queries table A, does some calculations and then returns a set. I use this function as query for my materialized view B. Everything works ...
Mehdi Pourfar's user avatar
2 votes
2 answers
502 views

In a PL/pgSQL function, RAISE EXCEPTION 'mymessage' USING ...; will have “mymessage” as the error message, but in a PL/Python function, plpy.error('mymessage', ...) will have “plpy.Error: mymessage” ...
Zachary Yaro's user avatar
6 votes
1 answer
2k views

I am using a plpython3 stored function, on a postgres database on MacOS (installed with standard Enterprise DB package). I can import standard python packages such as: CREATE OR REPLACE FUNCTION foo(x ...
fralau's user avatar
  • 3,969