CREATE VIEW fails if creator does not have all SELECT permissions

Details

Detail name Value
Changelog Number 11546
Type Bug
Status Resolved
Affected Versions Exasol 6.2.0, Exasol 7.0.0, Exasol 7.1.0
Fix Versions Exasol 8.9.0, Exasol 7.1.18
Resolution Date 2023-02-02

Background

Working with views requires understanding the following personas:

Creator: The user who creates the object
Selector: The user who is querying the view (in a SELECT statement)
Owner: The owner of the view is always the owner of the schema, NOT the creator

Users who have the privilege CREATE VIEW are able to create views in all schemas which they own. Additionally, if a user has the CREATE ANY VIEW privilege, they can create views in any schemas, even if they are not the owner.

The selector only needs SELECT privileges on the view, not the underlying objects.

Description

If a user has the privilege CREATE ANY VIEW, Exasol erroneously checks the permissions of the creator instead of the owner.

Workaround

Use CREATE FORCE to create the view.

Fix

In the above case, the privileges of the owner will be checked on view creation, not the creator