Postgres Set Variable Python Print