Re: CREATE OR REPLACE FUNCTION now validates it's dependents

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE OR REPLACE FUNCTION now validates it's dependents
Дата
Msg-id 542395.1748231641@sss.pgh.pa.us
обсуждение исходный текст
Ответ на CREATE OR REPLACE FUNCTION now validates it's dependents  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: