Subject | Re: [firebird-support] Re: A error of too many concurrent execution of the same request on a trigger |
---|---|
Author | Helen Borrie |
Post date | 2011-11-29T08:21:35Z |
At 08:03 PM 29/11/2011, ibmcom2011 wrote:
What WITH CHECK OPTION will do is prevent the user from updating the column (or columns) used in the WHERE filter.
But for the view for the purpose described, you should leave it unfiltered and apply a WHERE clause to it when you access it in the table trigger.
begin
if (old.YE is distinct from new.YE) then
begin
/* do nothing */
end
else
begin
/* do what you intended */
...
end
end
./h
>heLen,Do you have a WHERE clause in the view? If not, WITH CHECK OPTION is not valid.
>
>Thanks.
>
>I found I should add a "with check option" to the end of a updatable view in the introduction of FB2.0. Now my FB version is 2.5.
>
>But the option requires a where sub-clause, and I don't know how to do.
What WITH CHECK OPTION will do is prevent the user from updating the column (or columns) used in the WHERE filter.
But for the view for the purpose described, you should leave it unfiltered and apply a WHERE clause to it when you access it in the table trigger.
>And Now, I have a suppose on my trigger. For the Column YE is not be updated by user (it is non-visible for users), I want to strict the execution condition of the trigger through the Column. But how to write the condition?A test for modification would be invalid for (deleting).
>
>if (updating or (deleting)) then
>beginif (updating) then
> /* if YE is modified then leave .... */
begin
if (old.YE is distinct from new.YE) then
begin
/* do nothing */
end
else
begin
/* do what you intended */
...
end
end
./h