Tables and views with forbidden names

Summary

REAL lets one add tables and views with names that are forbidden in expressions.

Steps to reproduce

Launch REAL and issue the following commands:

  1. .add 123(A,B):file.csv (where file.csv is any CSV file with two columns)
  2. 123 ;

Similarly for view defitions:

  1. .add R(A,B):file.csv (where file.csv is any CSV file with two columns)
  2. Forbidden! := R ;
  3. Forbidden! ;

Expected result

The table or view should be rejected because it has an illegal names (which is not allowed in expressions).

Actual result

Tables and views with illegal names are added to the database schema, and expressions that mention them fail with a parsing error.

Possible fixes

Add a check for table/view names provided by the users, using the parser's BaseRelation rule.

Additional information

OS macOS Sonoma 14.7.1 (23H222)
Java openjdk version "22.0.2" 2024-07-1
real 0.7
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information