G-2510: Avoid using the LONG and LONG RAW data types.

Major

Portability

Reason

LONG and LONG RAW data types have been deprecated by ORACLE since version 8i - support might be discontinued in future ORACLE releases.

There are many constraints to LONG datatypes in comparison to the LOB types.

Example (bad)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
create or replace package example_package is
   g_long long;
   g_raw  long raw;

   procedure do_something;
end example_package;
/

create or replace package body example_package is
   procedure do_something is
   begin 
      null;
   end do_something;
end example_package;
/

Example (good)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
create or replace package example_package is
   procedure do_something;
end example_package;
/

create or replace package body example_package is
   g_long clob;
   g_raw  blob;

   procedure do_something is
   begin 
      null;
   end do_something;
end example_package;
/