PostgreSQL Error: 'must be owner of schema public' - Resolution and Best Practices
This error occurs when a non-owner user tries to modify or access the 'public' schema in a PostgreSQL database.
To resolve this error, the user must have the necessary privileges to access or modify the schema.
If you are the database owner or administrator, you can grant the necessary privileges to the user by running the following command:
GRANT USAGE ON SCHEMA public TO 'username';
Replace 'username' with the name of the user who needs access to the schema.
If the user needs more privileges to modify the schema, you can grant them the necessary privileges by running the following command:
GRANT ALL ON SCHEMA public TO 'username';
This grants the user all privileges to modify and access the schema.
Note: It is recommended to limit the privileges granted to users to prevent unauthorized access or modifications to the database.
原文地址: https://www.cveoy.top/t/topic/njDz 著作权归作者所有。请勿转载和采集!