Click here for important information about Computing.net.

Solved How to get access to public PostgreSQL schema?

November 24, 2020 at 06:36:39
Specs: Windows 10
Hello,

we use a DBaaS provider called Aiven to manage and monitor our database
It's just really convenient because everything is stored in a cloud and we don't have any hardware costs. They also take care of backing up and monitoring the data.
We have set up PostgreSQL as a database and I have a question: How can I get access to the public PostgreSQL schema? How do I have to proceed?

Greetings


See More: How to get access to public PostgreSQL schema?


#1
November 24, 2020 at 06:58:53
Unless you have reconfigured something, all users automatically have access to the public schema - hence the name. If not, the administrator will have to change the privileges on the schema.

If you create tables (for example) without specifying a schema they will use the public schema. This is all explained in the PostgrSQL documentation.


Reply ↓  Report •

#2
November 24, 2020 at 07:53:41
✔ Best Answer
Hey!

Have worked with Aiven in the work as well, as we have been working with Aiven for quite some time now. It's just really convenient that they offer so many services. Regarding PostgreSQL and access to the public schema: You need an extension for that. You need the "aiven_extras" extension so that you can access it as database user "avnadmin". Furthermore you have to execute these two queries:
- "CREATE EXTENSION aiven_extras CASCADE;"
- SELECT * FROM aiven_extras.claim_public_schema_ownership();"
After that the user "avnadmin" is the owner of the schema and can access it. For more information, please see Aiven's support page of Aiven for PostgreSQL.


Reply ↓  Report •
Related Solutions


Ask Question