I encountered an issue while trying to create a table in PostgreSQL, and I'm seeking help from the Stack Overflow community to resolve it.
Error Message:
ERROR: permission denied for schema public LINE 1: CREATE TABLE foo (id int);
Context: I am working on a PostgreSQL database, and I have a user/role with the necessary access to perform database operations. While attempting to create a new table, I used the following SQL query:
CREATE TABLE foo (id int);
Unfortunately, instead of creating the table successfully, I received a "permission denied" error pertaining to the "public" schema.
What I've Tried So Far:
I checked the privileges of my user/role, and it seems to have the necessary permissions to create tables in the database.