Postgresql Using Variables In Queries Vs View Sync