pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dominique Devienne <ddevienne@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Martijn Tonies (Upscene Productions) <m.tonies@upscene.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Date: Thu, 1 Dec 2022 09:41:17 -0800
Message-ID: <bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com> (raw)
In-Reply-To: <CAFCRh-8DBZdfq_r+5jX9s8XPGxrANCOuWffkBBadpRTm7VP-OA@mail.gmail.com>
References: <23DE96C56DFC404096553A22DDC5093B@MARTIJNWS>
<CAKFQuwbYCk0oA3VT+ngEebBTBjdtGsVLEFOdPX2qqQJobA7rtg@mail.gmail.com>
<1579912.1669908194@sss.pgh.pa.us>
<CAFCRh--K2tahGetbJ_mtjiwvfFb9fF6SzjGnvbyoMKPr92FiTQ@mail.gmail.com>
<c14b49a2043adafbe9589fab7af4eceb6199726c.camel@cybertec.at>
<CAFCRh-8DBZdfq_r+5jX9s8XPGxrANCOuWffkBBadpRTm7VP-OA@mail.gmail.com>
On 12/1/22 09:24, Dominique Devienne wrote:
> On Thu, Dec 1, 2022 at 5:10 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>> On Thu, 2022-12-01 at 16:38 +0100, Dominique Devienne wrote:
>>> FWIW, we have a custom schema introspection and diff'ing ad-hoc framework,
>>
>> This is arguable, but my opinion is that this is not a robust way to
>> do development. You should use a schema versioning tool like Liquibase,
>> develop schema migration scripts and maintain the SQL code in a source
>> repository like other software.
>
> We don't maintain SQL. We maintain a *Logical* model, and generate the
> physical model from it.
> FKs, NKs, Enums, CHECK constraints, indexes, etc.. all that
> "implementation details"
> is programmatically generated, and always consistent, from a much
> higher-level and simpler model.
> And you also get auto-upgrade most of the time, greatly increasing
> development velocity too.
>
> I would argue that NOT doing it this way, is the non-robust way myself :)
> We've been refactoring a large data-model maintained manually like you advocate,
> and I can't tell you how many anomalies we've discovered and had to fix,
> using the more robust formalism of using a high-level logical model
> and (DDL) code gen.
>
> I guess is a DBA-versus-Developer point-of-view difference. --DD
What this points to is that there are multiple ways to handle this, many
external to the server itself. My take is that the system catalogs are
there for the proper operation of the server and that is their task,
first and foremost. If you can piggyback of that then great, but with
the knowledge that the information may change to meet the needs of the
server not external users.
--
Adrian Klaver
adrian.klaver@aklaver.com
view thread (37+ messages) latest in thread
Message-ID: <bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com> Permalink: ../bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com/ Also on: postgresql.org/message-id/bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com ·
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 from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: adrian.klaver@aklaver.com, ddevienne@gmail.com, laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, m.tonies@upscene.com Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour In-Reply-To: <bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com> References: <23DE96C56DFC404096553A22DDC5093B@MARTIJNWS> <CAKFQuwbYCk0oA3VT+ngEebBTBjdtGsVLEFOdPX2qqQJobA7rtg@mail.gmail.com> <1579912.1669908194@sss.pgh.pa.us> <CAFCRh--K2tahGetbJ_mtjiwvfFb9fF6SzjGnvbyoMKPr92FiTQ@mail.gmail.com> <c14b49a2043adafbe9589fab7af4eceb6199726c.camel@cybertec.at> <CAFCRh-8DBZdfq_r+5jX9s8XPGxrANCOuWffkBBadpRTm7VP-OA@mail.gmail.com> <bee36d64-84e3-2918-9183-6035e1e6e221@aklaver.com> * 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