-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql/opt: name resolution for schemas when creating new objects should account for permissions/privileges #42383
Copy link
Copy link
Closed
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.C-investigationFurther steps needed to qualify. C-label will change.Further steps needed to qualify. C-label will change.
Milestone
Description
As part of work to support temporary tables, the system.namespace table is being extended to include an additional ParentSchemaID. This is a step towards supporting additional physical schemas other than public (even though none can be created yet).
Currently, the optimizer assumes that tables can only be created under the public schema and does no permission check. As we add the ability to scope under different schemas, a simple name check is not enough.
Instead, there needs to be a check to see if the schema exists + the user has privileges to create an object under that schema.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.C-investigationFurther steps needed to qualify. C-label will change.Further steps needed to qualify. C-label will change.