N
Neon4mo ago
correct-apricot

"Permissions Denied" creating extension on db other than "neondb"

Hello. I am using a db name other than neondb, and trying to add the extension pgcrypto via the Neon SQL Editor running the following: CREATE EXTENSION IF NOT EXISTS pgcrypto; I get this error: "ERROR: permission denied to create extension "pgcrypto" (SQLSTATE 42501) HINT: Must have CREATE privilege on current database to create this extension." Adding the extension works on the neondb database, but not on new ones that I have created.
1 Reply
correct-apricot
correct-apricotOP4mo ago
Solution found. You must grant the "create" permission to the neondb_owner role: GRANT CREATE ON DATABASE db_name TO neondb_owner; CREATE EXTENSION IF NOT EXISTS pgcrypto;

Did you find this page helpful?