G-2310: Avoid using CHAR data type.

Major

Reliability

Reason

CHAR is a fixed length data type, which should only be used when appropriate. CHAR columns/variables are always filled to its specified lengths; this may lead to unwanted side effects and undesired results.

Example (bad)

1
2
3
4
5
create or replace package types 
is
   subtype description_type is char(200);
end types;
/

Example (good)

1
2
3
4
5
create or replace package types 
is
   subtype description_type is varchar2(200 char);
end types;
/