Postgresql Variable In Query Which Filter