A database developer recently came across my  Bulletproof PL/SQL  presentation, which includes this slide.   That first item in the list caught his attention:   Never put calls to DBMS_OUTPUT.PUT_LINE in your application code.  So he sent me an email asking why I would say that. Well, I suppose that is the problem with publishing slide decks. All the explanatory verbiage is missing. I suppose maybe I should do a video. :-)   But in the meantime, allow me to explain.   First, what does DBMS_OUTPUT.PUT_LINE do? It writes text out to a buffer, and when your current PL/SQL block terminates, the buffer is displayed on your screen.   [Note: there can be more to it than that. For example, you could in your own code call DBMS_OUTPUT.GET_LINE(S) to get the contents of the buffer and do something with it, but I will keep things simple right now.]   Second, if I am telling you not to use this built-in, how could text from your program be displayed on your screen?   Not without a lot o...
For the last twenty years, I have managed to transform an obsession with PL/SQL into a paying job. How cool is that?
Comments
Post a Comment