Re: [SQL] rewriting values with before trigger

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема Re: [SQL] rewriting values with before trigger
Дата
Msg-id 20030424211805.22526.qmail@celery.tssi.com
обсуждение исходный текст
Ответ на Re: [SQL] rewriting values with before trigger  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
> OR, deliberately name your triggers with alphanumerical prefixes that
> forces them to fire in a certain order, and making the trigger that
> does the conversion fire first?

The SQL 99 standard mandates that triggers fire the order defined, though
the docs say pgsql does it in alphabetical order, possibly because that
was easier to implement.

It is probably better to assume that in any given situation they will fire
in a random order and sequence events yourself when necessary.

That may mean throwing the '' into NULL logic into every trigger for that
table, though there are probably more elegant ways to achieve that result.

If God (or Codd?) had meant us to enable triggers to fire in a particular
order, there would be a 'firing order nnnn' sequencing parameter in the
standard.

--
Mike Nolan


В списке pgsql-general по дате отправления:

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: pl-pgsql question
Следующее
От: "Matthew Nuzum"
Дата:
Сообщение: Re: [SQL] rewriting values with before trigger