Re: SuperUser permission denied when creating table. - Mailing list pgsql-general

From Tom Lane
Subject Re: SuperUser permission denied when creating table.
Date
Msg-id 15286.1562681684@sss.pgh.pa.us
Whole thread Raw
In response to SuperUser permission denied when creating table.  (Dave Hughes <dhughes20@gmail.com>)
List pgsql-general
Dave Hughes <dhughes20@gmail.com> writes:
> I recently noticed that my default superuser "postgres" cannot create
> tables in new schemas I create, but can in some existing ones.

> So as the postgres user I ran:
> afleads=# create schema mytest;
> CREATE SCHEMA
> afleads=# create table mytest.test (col1 int);
> ERROR:  permission denied for schema mytest
> LINE 1: create table mytest.test (col1 int);

I think you're shooting yourself in the foot with those event triggers,
ie trg_create_table is switching the role to something that lacks
permissions to do the CREATE.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_dump and search_path
Next
From: "Igal @ Lucee.org"
Date:
Subject: Re: pg_dump and search_path