Postgres Set Variable In Query