Help Center/ Relational Database Service_RDS for PostgreSQL/ Troubleshooting/ Error "permission denied for schema public" Was Reported When I Attempted to Create a Table Using a Common Account
Updated on 2026-07-06 GMT+08:00

Error "permission denied for schema public" Was Reported When I Attempted to Create a Table Using a Common Account

Scenarios

The error "permission denied for schema public" was reported during table creation in RDS for PostgreSQL.

The process was as follows:

  1. An RDS for PostgreSQL 17 instance was created.
  2. The database postgres was connected using the root account.
  3. After a successful connection, a new database test_001 and a new account test were created.
  4. The owner of database test_001 was changed to test.
  5. The error message "permission denied for schema public" was displayed when the test account was used to connect to the test_001 database and the following command was executed to create a table:
    create table test001(id varchar(2));

Possible Causes

The common account lacks necessary permissions.

Solutions

  1. Connect to the test_001 database as the root user and run the following command to configure permissions for the test account:
    grant create on schema public to test;
  2. Connect to the test_001 database as the test user and run the table creation command again. The command will be executed successfully.
    create table test001(id varchar(2));