Postgres Create Trigger Execute Function Python Programming