jian he <jian.universality@gmail.com> writes:
> The attached patch allows CREATE OR REPLACE FUNCTION to correctly update domain
> constraints when the function they depend on is changed.
Why is this a problem that needs solving?
Our fundamental expectation is that domain constraints are immutable
(see the Notes section under CREATE DOMAIN [1]). If the user changes
a function used in a constraint in a way that changes its behavior,
that's their fault not our problem. I don't think we should add a
bunch of code (that we have to maintain) and a bunch of overhead for
every CREATE OR REPLACE FUNCTION in order to slap people on the wrist
if they get this wrong.
regards, tom lane
[1] https://www.postgresql.org/docs/current/sql-createdomain.html