Re: Grant all privileges to user on a database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Kaushal Shriyan <kaushalshriyan(at)gmail(dot)com>, Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Grant all privileges to user on a database
Date: 2023-07-24 14:09:06
Message-ID: 1549849.1690207746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> The error message is misleading, you can’t directly create tables in a
> database, you must create them in a schema and the permission to do so is
> granted to the role on the schema, not the database.

The actual server message is going to be just

ERROR: permission denied for schema public

I'm not sure where the "Are you sure ..." bit came from, but it wasn't
Postgres.

Anyway, backing up two steps, it looks like drupal hasn't yet adapted
to the v15 change that removed default create privileges on the public
schema (for security reasons). You might see if a newer drupal release
is available. If not, the best bet would likely be

GRANT ALL ON SCHEMA public TO public;

If you run into more problems, a more drastic answer might be to
downgrade to whatever drupal considers a supported release of
Postgres.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2023-07-24 14:17:59 Re: \d don't print all the tables
Previous Message David G. Johnston 2023-07-24 13:56:28 Re: Grant all privileges to user on a database