Postgresql Using Variables In Queries Vs Views