Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 526319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:45:49+00:00 2026-05-13T08:45:49+00:00

Coming from MySQL and not knowing about ROLEs I absentmindedly tried this GRANT CREATE

  • 0

Coming from MySQL and not knowing about ROLEs I absentmindedly tried this

GRANT CREATE ON TABLESPACE pg_default TO username;

It didn’t have the desired effect. The command that I was looking for was:

ALTER ROLE username WITH CREATEDB;

But what’s the difference precisely? Does giving someone the CREATEDB role implicitly give them CREATE ON TABLESPACE …? Is there a table where I can see all this?

From the docs, GRANT CREATE ON TABLESPACE means (my emphasis):

For tablespaces, allows tables,
indexes, and temporary files to be
created within the tablespace, and
allows databases to be
created
that have the
tablespace as their default
tablespace. (Note that revoking this
privilege will not alter the placement
of existing objects.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:45:49+00:00Added an answer on May 13, 2026 at 8:45 am

    They are completely different privileges. CREATEDB means the role can create database. If your role doesn’t have that, it can’t create databases, period.

    Granting CREATE for a tablespace to a role means that the role will be able to use that tablespace as default tablespace for the database. So a role that has CREATEDB will be able to create a database; just not on that tablespace. Note that there’s always a pg_default tablespace that will be used as default tablespace for databases that don’t otherwise have a default tablespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to MySQL coming from Oracle. I have a requirement to create
Coming from a C background, I may be getting too anal about this and
I am coming from MSSQL, and now using Mysql, this may be a easy
I have a swing application that uses some datas coming from an external mysql
I want to initialize a class with data coming from a MySql db. Some
Im a bit new to T-SQL, Coming from a MySQL background Im still adapting
I'm using this example to store in the database the info coming from PayPal,
coming from php and Mysql i know how its best done in php but
I'm new to RoR coming from django, RoR is not as easy as django
I have a video gallery where the data is coming from a mysql database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.