Bird
0
0

You run the following command but get an error:

medium📝 Debug Q14 of 15
PostgreSQL - Advanced Features
You run the following command but get an error:
CREATE EXTENSION uuid-ossp;
What is the most likely cause and how to fix it?
AExtension is already installed; use DROP EXTENSION first
BYou lack superuser rights; ask admin to enable it
CSyntax error; command should be ENABLE EXTENSION uuid-ossp;
DExtension not supported in PostgreSQL
Step-by-Step Solution
Solution:
  1. Step 1: Understand permissions for creating extensions

    Creating extensions like uuid-ossp requires superuser privileges in PostgreSQL.
  2. Step 2: Identify cause of error

    If you get an error running CREATE EXTENSION uuid-ossp;, it is likely due to insufficient permissions, not syntax or availability.
  3. Final Answer:

    You lack superuser rights; ask admin to enable it -> Option B
  4. Quick Check:

    CREATE EXTENSION needs superuser [OK]
Quick Trick: CREATE EXTENSION needs superuser rights [OK]
Common Mistakes:
  • Assuming syntax error instead of permission issue
  • Trying to DROP extension before creating
  • Thinking extension is unsupported

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes