Postgres Execute Function Python Syntax Checker