I get this error:
when I run the following in a test window:
Commenting out the second line makes the problem go away. It looks like when PL/SQL Developer fetches the output for the DBMS Output tab, it does so by calling DBMS_OUTPUT.get_line with a 4000-character buffer when really it should use a 32767-byte buffer according to the DBMS_OUTPUT package header comments for get_line:
Code:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_OUTPUT", line 151
ORA-06512: at line 2
when I run the following in a test window:
Code:
begin
dbms_output.put_line(rpad('x',4000,'x'));
dbms_output.put_line(rpad('x',4001,'x'));
end;
Commenting out the second line makes the problem go away. It looks like when PL/SQL Developer fetches the output for the DBMS Output tab, it does so by calling DBMS_OUTPUT.get_line with a 4000-character buffer when really it should use a 32767-byte buffer according to the DBMS_OUTPUT package header comments for get_line:
-- Output parameters:
-- line
-- This line will hold the line - it may be up to 32767 bytes long.