Postgresql Using Variables In Queries Vs Tables