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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay