Skip to main content
All CollectionsHelp ArticlesReportingODBC
Creating New Objects in Schemas
Creating New Objects in Schemas
Updated over a year ago

As of 4.14.1.1 a new custom schema has been created along with changes to the general permission structure of the Penelope SQL database. The instructions below describe how to create new objects in each schema. This new structure is defined by ownership of object defined at the time of creation.

Defining ownership

By default, objects are created with an owner of the login role used to create the object. You can change your user identifier by using the SET ROLE functionality before creating your object. Typically one would use SET LOCAL ROLE <role_name>; at the start of your transaction:

Begin;
SET LOCAL ROLE custom_admin_legacy;

--create stuff, here is a simple example
CREATE VIEW custom.my_view AS
Version()
;
COMMIT;

Schema & Who

Owner

custom schema by client (client can use and modify this object)

custom_admin_legacy

custom schema by client

custom_admin_legacy

You’ll need to change your user identifier to custom_admin_legacy by using the SET ROLE functionality before creating your object.

Did this answer your question?