Temporary Tables: Changes to Table Creation in Schemas¶
Attention
This behavior change is in the 2023_03 bundle.
For the current status of the bundle, refer to Bundle History.
The behavior of the creating temporary table in a schema behaves as follows:
- Previously:
You can create a temporary table that has the same name as the table in the same schema without having any privileges on the table itself.
- Currently:
To create a temporary table with the same name as the table in a schema, the role in use must be granted or inherit a role that has the OWNERSHIP privilege on the table.
This change is to prevent naming conflicts with permanent tables in the same schema. Note that you should update your scripts that create temporary tables with the same name as the table in the same schema. You can either rename the temporary table or grant the OWNERSHIP privilege for the table to the role used to create the temporary table.
Ref: 427