![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
SQL specifies that multiple triggers should be fired in time-of-creation order. PostgreSQL uses name order, which was judged to be more convenient. |

#2
| |||
| |||
|
|
SQL specifies that multiple triggers should be fired in time-of-creation order. PostgreSQL uses name order, which was judged to be more convenient. I have to say that this seems wrong to me. One of the basic rules in programming/coding is that name of class/ variable/function/etc. should describe its purpose/function/use. Being forced to adjust name of object to manage its position within some kind of stack is against this concept. ![]() Obviously I can't tell what _exactly_ was meant by "more convenient" as it depends on context, but from my (user) point of view the time-of- creation order sounds to be more clear/proper approach, re-creating triggers in desired order is a matter of seconds. |
#3
| |||||
| |||||
|
|
Jaroslav Záruba wrote: SQL specifies that multiple triggers should be fired in time-of-creation order. PostgreSQL uses name order, which was judged to be more convenient. I have to say that this seems wrong to me. One of the basic rules in programming/coding is that name of class/ variable/function/etc. should describe its purpose/function/use. Being forced to adjust name of object to manage its position within some kind of stack is against this concept. ![]() Obviously I can't tell what _exactly_ was meant by "more convenient" as it depends on context, but from my (user) point of view the time-of- creation order sounds to be more clear/proper approach, re-creating triggers in desired order is a matter of seconds. One convenience aspect clearly is the convenience fo the developers: Currently the trigger creation time is not stored in the catalogs. |
|
Also, I think it is pretty inconvenient if the trigger firing order changes if I drop and recreate a trigger... |
)|
Alphabetical ordering is a simple rule; if you care about trigger order, you just follow the rule. |

|
Just for the record, this is how Oracle solves it: * Oracle fires multiple triggers in an unspecified, * random order, if more than one trigger of the same type * exists for a given statement; that is, triggers of the * same type for the same statement are not guaranteed * to fire in any specific order. (fromhttp://download.oracle.com/docs/cd/B19306_01/server.102/b14220/trigge...). |

|
Yours, Laurenz Albe |
#4
| |||
| |||
|
|
SQL specifies that multiple triggers should be fired in time-of-creation order. PostgreSQL uses name order, which was judged to be more convenient. I have to say that this seems wrong to me. One convenience aspect clearly is the convenience fo the developers: Currently the trigger creation time is not stored in the catalogs. Aha, that would be it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |