Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osENF-000296-H1 for pgsql-admin@arkaria.postgresql.org; Tue, 08 Nov 2022 02:30:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1osENE-0006ZX-BE for pgsql-admin@arkaria.postgresql.org; Tue, 08 Nov 2022 02:30:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osEND-0006ZO-Vr for pgsql-admin@lists.postgresql.org; Tue, 08 Nov 2022 02:29:59 +0000 Received: from mout-u-204.mailbox.org ([80.241.59.204]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osENB-0002zA-UT for pgsql-admin@lists.postgresql.org; Tue, 08 Nov 2022 02:29:59 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4N5sWN4CVSz9sRj; Tue, 8 Nov 2022 03:29:52 +0100 (CET) Date: Tue, 8 Nov 2022 03:29:51 +0100 (CET) From: Erik Wienhold To: Wells Oliver Cc: pgsql-admin@lists.postgresql.org Message-ID: <1103549459.284197.1667874591587@office.mailbox.org> In-Reply-To: References: <903563259.260181.1667842135503@office.mailbox.org> <4240dcf8-2226-15dc-3a0d-1fd76f8c38bc@gmail.com> <1581955070.282646.1667869831483@office.mailbox.org> Subject: Re: Allowing users to create objects in version controlled schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4N5sWN4CVSz9sRj List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 08/11/2022 02:19 CET Wells Oliver 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