Feature request: schema diff tool

From: Neszt Tibor <neszt76(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Feature request: schema diff tool
Date: 2024-04-24 06:44:35
Message-ID: CAAN1oLAQMJnDqSGvcP2Raq8sgkz5xTcmwiBvsAxXHRY5cEVO9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

A diff tool that would generate create, drop, alter, etc. commands from the
differences between 2 specified schemes would be very useful. The diff
could even manage data, so there would be insert, delete update command
outputs, although I think the schema diff management is much more important
and necessary.

Today, all modern applications are version-tracked, including the sql
scheme. Now the schema changes must be handled twice: on the one hand, the
schema must be modified, and on the other hand, the schema modification
commands must also be written for the upgrade process. A good diff tool
would allow only the schema to be modified.

Such a tool already exists because the community needed it, e.g. apgdiff. I
think the problem with this is that the concept isn't even good. I think
this tool should be part of postgresql, because postgresql always knows
what the 100% sql syntax is current, an external program, for example
apgdiff can only follow changes afterwards, generating continuous problems.
Not to mention that an external application can stop, e.g. apgdiff is also
no longer actively developed, so users who built on a diff tool are now in
trouble.

Furthermore, it is the least amount of work to do this on the postgresql
development side, you have the expertise, the sql language processor, etc.

What is your opinion on this?

Regards,
Neszt Tibor

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2024-04-24 06:50:52 Small filx on the documentation of ALTER DEFAULT PRIVILEGES
Previous Message Masahiko Sawada 2024-04-24 06:34:47 Re: Fix parallel vacuum buffer usage reporting