Re: foreign key locks, 2nd attempt

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks, 2nd attempt
Date: 2011-11-19 09:21:51
Message-ID: CA+U5nMK13ij662FZKkc6ZcwA1EVd_Dj1DozhTS-jQc1dftKCow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 3, 2011 at 6:12 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-11-19 14:56:50 Re: Core Extensions relocation
Previous Message Simon Riggs 2011-11-19 09:21:41 Re: foreign key locks, 2nd attempt