title: oracle pl/sql bug: can't put_line more than 2000 characters
body: <p>Has anyone else noticed this phenomenon where <code>dbms_output.put_line</code> is unable to print more than 2000 characters at a time?</p>
  
  <p>Script is:</p>
  
  <pre><code>set serveroutput on size 100000;
  
  declare
      big_str varchar2(2009);
  begin
      for i in 1..2009 loop
          big_str := big_str||'x';
      end loop;
  
      dbms_output.put_line(length(big_str));
      dbms_output.put_line(big_str);
  end;
  
  /
  </code></pre>
  
  <p>I copied and pasted the output into an editor (Notepad++) which told me there were only 2000 characters, not 2009 which is what I think should have been pasted. This also happens with a few of my test scripts - only 2000 characters get printed.</p>
  
  <p>I have a workaround to print like this:</p>
  
  <pre><code>dbms_output.put_line(length(big_str));
  dbms_output.put_line(substr(big_str,1,1999));
  dbms_output.put_line(substr(big_str,2000));
  </code></pre>
  
  <p>This adds new lines to the output, makes it hard to read when the text you're working with is preformatted.</p>
  
  <p>Has anyone else noticed this? Is it really a bug or some sort of obscure feature? Is there a better workaround? Is there any other information on this out there?</p>
  
  <p>Oracle version is: 10.2.0.3.0, using PL/SQL Developer (from Allround Automation).</p>