Can you try modify your SQL to explicitely set the returned data type:
SELECT worksheet_id, user_id, num_edited, num_corrected, grade::float
FROM user_worksheet_grades
WHERE user_id = 23 AND worksheet_id = 105;
If this doesn't work too, than you can at least exclude a casting issue
...
cheers,
Marc