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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: CREATE OR REPLACE FUNCTION now validates it's dependents
Дата
в 06:54:01
Msg-id
542395.1748231641@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
CREATE OR REPLACE FUNCTION now validates it's dependents jian he <jian.universality@gmail.com>
Re: CREATE OR REPLACE FUNCTION now validates it's dependents Tom Lane <tgl@sss.pgh.pa.us>
jian he  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 по дате отправления
От: jian he
Дата:
От: Peter Eisentraut
Дата:
Сообщение: Re: SQL:2011 application time
FAQ