Postgresql Select Data From Cursor Library