Postgresql Function Select Into Variable Sql