Postgresql Declare Variable In Sql Script Compare