Skip to content

sql/opt: name resolution for schemas when creating new objects should account for permissions/privileges  #42383

@arulajmani

Description

@arulajmani

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-optimizerSQL logical planning and optimizations.A-sql-privilegesSQL privilege handling and permission checks.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.C-investigationFurther steps needed to qualify. C-label will change.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions