I need to load the uuid extension on my database, which is being created in runtime. The user that created the db is not superuser, she only has the "CREATEDB" permissions.
Is there a way to do this? Thanks.
|
I need to load the uuid extension on my database, which is being created in runtime. The user that created the db is not superuser, she only has the "CREATEDB" permissions. Is there a way to do this? Thanks. |
|||
|
|
|
I see two possibilities: 1) Install the extension into a template database (just a regular database) and use it as template for CREATE DATABASE:
That copies all installed extensions into the new database. Your user obviously can do that. Also, if she created the database she may already have the necessary privileges to run
2) Create a function with
Be sure to read the chapter "Writing SECURITY DEFINER Functions Safely" in the manual. |
|||||||||
|