felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
211 stars 77 forks source link

TABLE OF and VARRAY parser rules have superfluous (NOT) NULL notation #159

Closed mcpiroman closed 2 years ago

mcpiroman commented 2 years ago

NESTED_TABLE_DEFINITION and VARRAY_TYPE_DEFINITION are defined as ..., DATATYPE, b.optional(NOT, NULL), however DATATYPE already handles (NOT) NULL. This means that invalid statement like TYPE a IS TABLE OF NUMBER NOT NULL NOT NULL; is accepted.

felipebz commented 2 years ago

Nice catch, I didn't notice this. Thanks again.