Re: Privilege required for IF EXISTS event if the object already exists

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Shay Rojansky <roji(at)roji(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Privilege required for IF EXISTS event if the object already exists
Date: 2021-12-15 18:50:10
Message-ID: CAKFQuwaWcAenxCTc0OzMm+u_JK_KoqerFCNthfNTDY2Y5f5s2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, December 15, 2021, Shay Rojansky <roji(at)roji(dot)org> wrote:
>
> . Now, before creating tables, the ORM generates CREATE SCHEMA IF NOT
> EXISTS, to ensure that the schema exists before CREATE TABLE; that's
> reasonable general-purpose behavior.
>

If the user hasn’t specified they want the schema created it’s arguable
that executing create schema anyway is reasonable. The orm user should
know whether they are expected/able to create the schema as part of their
responsibilities and instruct the orm accordingly and expect it to only
create what it has been explicitly directed to create.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Koch 2021-12-15 19:58:02 psql format output
Previous Message Bruce Momjian 2021-12-15 18:45:44 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints