pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Allowing users to create objects in version controlled schema
Date: Tue, 8 Nov 2022 03:29:51 +0100 (CET)
Message-ID: <1103549459.284197.1667874591587@office.mailbox.org> (raw)
In-Reply-To: <CAOC+FBXaqH=8MwLpbBMk3A27QvQm4JY1tX35E+xm_+P-LyMjkg@mail.gmail.com>
References: <903563259.260181.1667842135503@office.mailbox.org>
	<4240dcf8-2226-15dc-3a0d-1fd76f8c38bc@gmail.com>
	<1581955070.282646.1667869831483@office.mailbox.org>
	<CAOC+FBXaqH=8MwLpbBMk3A27QvQm4JY1tX35E+xm_+P-LyMjkg@mail.gmail.com>

> On 08/11/2022 02:19 CET Wells Oliver <wells.oliver@gmail.com> wrote:
>
> Feels like more of a process question and less of a technical postgres
> question.

You're right.  But I'm wondering what's possible on the technical front.

> In our world, each DB user has their own schema they have full access to, and
> can grant privileges as required.

Right, the standard approach with search_path = "$user".

> All schema definitions tables/views/etc are versioned using git in a structured
> repository of flat sql files. It works well. Table defs etc get code reviewed
> and deployed by more DB-minded engineers,

That's what I meant with version controlled migrations.  And I actually don't
want users to bypass that process to create and reference their own database
structures when those structures should rather be part of the common application
schema.

> and people are cognizant of writing optimized SQL.

That's where I have my doubts when it comes to inexperienced "devs" and no
guiding code reviews.

--
Erik





view thread (9+ messages)  latest in thread

Message-ID: <1103549459.284197.1667874591587@office.mailbox.org>
Permalink:  ../1103549459.284197.1667874591587@office.mailbox.org/
Also on:    postgresql.org/message-id/1103549459.284197.1667874591587@office.mailbox.org

 · 

reply

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-admin@postgresql.org
  Cc: ewie@ewie.name, wells.oliver@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Allowing users to create objects in version controlled schema
  In-Reply-To: <1103549459.284197.1667874591587@office.mailbox.org>

* 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