I needed to perfom some linear programming calculations with my local Postgres installation whenever there was change(insert/update) in any row for my events table.
This prompted the creation of a trigger function(NB: the example below is a UDF that doesn't return a trigger) and binding it to the table.I edited a dummy function to test if my third party module
pulp was actually being imported by the PL/Python embedded interpreter.The lib was installed on my systemwide local site-package dir /home//.local/lib/python2.7/site-packages - Elementary Juno
and visible on pip freeze
CREATE OR REPLACE FUNCTION pyversion() RETURNS text AS $$
import sys,os