DEV Community

Imelda
Imelda

Posted on

Having "permission denied" error while creating table in DBeavers using postgres?

Sometimes, while using postgres on DBeavers, postgres is usually the root user. Now let's assume you're just a user created by this root user and still are not able to create your own table, you can find your way by creating your own schema.

Just type as your first line of code:

CREATE SCHEMA <schema_name>
Enter fullscreen mode Exit fullscreen mode

Then go ahead to create your table.

Note: while

CREATE TABLE <schema_name>.<table_name>
Enter fullscreen mode Exit fullscreen mode

Creates a table in that particular schema,

CREATE TABLE <table_name>
Enter fullscreen mode Exit fullscreen mode

Creates a table in the public schema.

Either way works. Good luck.

Please leave a feedback if this helps you.

Top comments (0)