From: Tom Lane <tgl@sss.pgh.pa.us>
To: wolakk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17598: EXTENSION can no longer create it's own schema! (Create Schema IF NOT EXISTS XXX)
Date: Mon, 29 Aug 2022 09:38:39 -0400
Message-ID: <3136392.1661780319@sss.pgh.pa.us> (raw)
In-Reply-To: <17598-90d4e2f6057cbfec@postgresql.org>
References: <17598-90d4e2f6057cbfec@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Effectively if FEELS like the check for an schema/extension
> "owning/belonging to" a schema/extension is failing.
> In this case, the schema DOES NOT EXIST. And the create if not exists
> FAILS! (Which feels like an edge case.
This is an intentional change to close a security hole: it is unsafe for
an extension script to use CREATE IF NOT EXISTS this way. (What if
a hostile attacker created the schema? Now you are depending on a
schema that the attacker has ownership privileges on.) Drop the
IF NOT EXISTS clause, if you're expecting the extension to create the
schema.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, wolakk@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17598: EXTENSION can no longer create it's own schema! (Create Schema IF NOT EXISTS XXX)
In-Reply-To: <3136392.1661780319@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox