Postgresql Create Trigger Function Example Python Script