PROCEDURE read_file (file_in IN UTL_FILE.file_type) IS l_line VARCHAR2 (32767); BEGIN LOOP UTL_FILE.get_line (file_in, l_line); END LOOP; END;explaining: "This simple loop contains no EXIT, RAISE or RETURN statements, so at first glance one might think it will never terminate. This loop will not, however, go on and on and on. The reason is that there is no such thing as an infinitely large file (even if there is no limit to a file size, each and every file that is opened will have a finite number of lines in it). And when UTL_FILE.GET_LINE reads past the end of a file, it raises the NO_DATA_FOUND exception."
A player wrote with the following objection:
"The answer with UTL_FILE.get_line is not completely correct. At least the answer is stating "The reason is that there is no such thing as an infinitely large file ..." which is not correct. When I was answering it, pseudo files like /dev/urandom came to my mind, which make the loop really indefinite. If you are running on Win, you can check following wiki site: http://en.wikipedia.org/wiki//dev/random."
Big news to me. Has anyone had experience with this? Would anyone like to test out this hypothesis?