The following examples are marked with “2106 Avoid unnecessary references to schema names.” but they should not, since the objects are not created for my schema.
CREATE VIEW other_schema.test_view
CREATE PROCEDURE other_schema.test_proc
Having a look at this rule I even wonder how we find out that a reference is “unnecessary”. Supposing we have…
CREATE VIEW my_schema.test_view
…then it’s easy to find out that my_schema in the FROM clause is redundant.
Do you feel that we should amend the logic this way? (i.e. look at the schema where the unit is created)
Yes, I think it’s okay to check against the schema where the object is created.
If no schema is provided explicitly, then this is the current user:
CREATE VIEW test_view
We decided to yank this rule due to too context dependent. As of QP5 version 5.316 it will no longer be listed.