postgresql script select into variable