Skip to content

G-2180: Never use quoted identifiers.

Major

Maintainability

Reason

Quoted identifiers make your code hard to read and maintain.

Example (bad)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
declare
   "sal+comm"     integer;               -- violates also naming conventions (G-9102)
   "my constant"  constant integer := 1; -- violates also naming conventions (G-9114)
   "my exception" exception;             -- violates also naming conventsion (G-9113)
begin
   "sal+comm" := "my constant";
   do_something("sal+comm");
exception
   when "my exception" then
      null;
end;
/

Example (good)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
declare
   l_sal_comm     integer;
   co_my_constant constant integer := 1;
   e_my_exception exception;
begin
   l_sal_comm := co_my_constant;
   do_something(l_sal_comm);
exception
   when e_my_exception then
      null;
end;
/