Sql Set Variable Values With Select Statement In Postgresql