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)

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay