Re: Subqueries in Check() -- Still Intentionally Omitted?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Subqueries in Check() -- Still Intentionally Omitted?
Дата
Msg-id 20080902224744.GN12610@alvh.no-ip.org
обсуждение исходный текст
Ответ на Subqueries in Check() -- Still Intentionally Omitted?  ("Richard Broersma" <richard.broersma@gmail.com>)
Ответы Re: Subqueries in Check() -- Still Intentionally Omitted?  (Jeff Davis <pgsql@j-davis.com>)
Re: Subqueries in Check() -- Still Intentionally Omitted?  ("Richard Broersma" <richard.broersma@gmail.com>)
Список pgsql-general
Richard Broersma escribió:
> I am curious if the motivation is still valid for intentionally
> omitting check sub-queries. (what was the motivation to begin with?)

The problem is that you have to rerun the query to verify that the CHECK
condition still holds, whenever the table that the CHECK clause is
checking changes.  This is rather problematic, because we'd need to make
the system aware of such reverse dependencies.

The usual workaround is only enough protection if you trust that the
table referenced in the CHECK query does not change.  If the query
references something other than a table (say a function), it gets even
more messy.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: "Richard Broersma"
Дата:
Сообщение: Subqueries in Check() -- Still Intentionally Omitted?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Subqueries in Check() -- Still Intentionally Omitted?