Subject | Re: Dirty reading from a trigger |
---|---|
Author | johnsparrowuk |
Post date | 2004-06-05T11:48:19Z |
I think this would be great.
After all, it seems to me a bit inconsistent that indexes don't
really 'do' the generational thing, while everything else does. If
indexes could only see their own version, they'd be virtually
useless (or else exceptions would have to be raised on-commit, and
some way found of dealing with that without a full rollback).
Whatever, transaction-isolated indexes arn't really practical, even
though (to me) they seem more 'pure'.
So then, as Jerome suggests, shouldn't we have the option of letting
our triggers operate outside the local transaction (at lease for
selecting)?? Sure it would allow people to write stupid code if they
choose - but so does SELECT ... WITH LOCK
Triggers only. I can't at this moment see any use for this in a
sproc.
Something like; constraint-trigger: see everything; action-trigger:
see local transaction only.
John
--- In firebird-support@yahoogroups.com, "Jerome Bouvattier"
<JBouvattier@I...> wrote:
After all, it seems to me a bit inconsistent that indexes don't
really 'do' the generational thing, while everything else does. If
indexes could only see their own version, they'd be virtually
useless (or else exceptions would have to be raised on-commit, and
some way found of dealing with that without a full rollback).
Whatever, transaction-isolated indexes arn't really practical, even
though (to me) they seem more 'pure'.
So then, as Jerome suggests, shouldn't we have the option of letting
our triggers operate outside the local transaction (at lease for
selecting)?? Sure it would allow people to write stupid code if they
choose - but so does SELECT ... WITH LOCK
Triggers only. I can't at this moment see any use for this in a
sproc.
Something like; constraint-trigger: see everything; action-trigger:
see local transaction only.
John
--- In firebird-support@yahoogroups.com, "Jerome Bouvattier"
<JBouvattier@I...> wrote:
> Still, wouldn't it be interesting to have a way to flag a triggeras running
> in the system context like declarative constraints would ?can't be
> This would really help when you want integrity constraints that
> formulated with decl constraints or when you explicitly don't wantto use
> decl constraints (e.g you don't want to introduce a poorlyselective index).
> AFAIU, currently, writing custom constraints in triggers thatreads data
> outside the modified record isn't 100% safe since a trigger runsin the
> client's transaction context (which could be in "snapshot" mode).