Обсуждение: transactions

Поиск
Список
Период
Сортировка

transactions

От
Dennis Gearon
Дата:
1/ Does a procedure take place all in one transaction?

2/ If I am updating/deleting/inserting into two tables, and both tables have triggers on them to
check the relationship of the data between the tables, any way of knowing which trigger will fire
first at the  end of the transaction?



Re: transactions

От
Doug McNaught
Дата:
Dennis Gearon <gearond@cvc.net> writes:

> 1/ Does a procedure take place all in one transaction?

Yes.  If you're not using BEGIN/END explicitly each query is its own
transaction.

> 2/ If I am updating/deleting/inserting into two tables, and both tables have triggers on them to
> check the relationship of the data between the tables, any way of knowing which trigger will fire
> first at the  end of the transaction?

I'm not sure about this one--do the docs say anything?

-Doug

Re: transactions

От
Oliver Elphick
Дата:
On Fri, 2003-02-21 at 18:26, Doug McNaught wrote:
> Dennis Gearon <gearond@cvc.net> writes:

> > 2/ If I am updating/deleting/inserting into two tables, and both tables have triggers on them to
> > check the relationship of the data between the tables, any way of knowing which trigger will fire
> > first at the  end of the transaction?
>
> I'm not sure about this one--do the docs say anything?

In 7.3, I believe triggers fire in alphabetical order.  There was no
predictable order in earlier versions.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "All scripture is given by inspiration of God, and is
      profitable for doctrine, for reproof, for correction,
      for instruction in righteousness; That the man of God
      may be perfect, thoroughly furnished unto all good
      works."         II Timothy 3:16,17