Re: foreign key locks, 2nd attempt

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: foreign key locks, 2nd attempt
Дата
Msg-id 16993.1321717008@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: foreign key locks, 2nd attempt  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: foreign key locks, 2nd attempt
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Thu, Nov 3, 2011 at 6:12 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>> So Noah Misch proposed using the FOR KEY SHARE syntax, and that's what I
>> have implemented here. �(There was some discussion that instead of
>> inventing new SQL syntax we could pass the necessary lock mode
>> internally in the ri_triggers code. �That can still be done of course,
>> though I haven't done so in the current version of the patch.)

> FKs are a good short hand, but they aren't the only constraint people
> implement. It can often be necessary to write triggers to enforce
> complex constraints. So user triggers need access to the same
> facilities that ri triggers uses. Please keep the syntax.

It's already the case that RI triggers require access to special
executor features that are not accessible at the SQL level.  I don't
think the above argument is a compelling reason for exposing more
such features at the SQL level.  All we need is that C-coded functions
can get at them somehow.
        regards, tom lane


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Core Extensions relocation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: EXPLAIN (plan off, rewrite off) for benchmarking