Re: Trigger position

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Trigger position
Дата
Msg-id CAFj8pRCnsA8RTGhhirdmKXsT7gnuvaTup8A6wi1HL85rttDaCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger position  ("Euler Taveira" <euler@eulerto.com>)
Ответы Re: Trigger position  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers


st 15. 9. 2021 v 17:14 odesílatel Euler Taveira <euler@eulerto.com> napsal:
On Wed, Sep 15, 2021, at 10:51 AM, Alvaro Herrera wrote:
In a computer system, alphabet letters are just a different way to
present numbers, so you just choose ASCII letters that match what you
want.  You can use "AA_first_trigger", "BB_second_trigger",
"AB_nope_this_is_second" and you'll be fine; you can do
"AAB_oops_really_second" afterwards, and so on.  The integer numbering
system doesn't seem very useful/flexible when seen in this light.
... or renumber all trigger positions in a single transaction. I agree that
letters are more flexible than numbers but some users are number-oriented.

I'm afraid an extra mechanism to determine the order to fire triggers will
confuse programmers if someone decides to use both. Besides that, we have to
expend a few cycles to determine the exact trigger execution order.

Triggers that depend on execution order are pretty hell. It is a clean signal of some crazy design and overusing of triggers.

Personally I prefer to don't have any similar feature just as a strong signal for developers - Don't do this. Unfortunately (but good for business) . A lot of migrated applications from Oracle use this terrible style. I like PL/SQL, but the most ugly code that I saw was in PL/SQL. So this feature can be necessary for migrations from Oracle, but I don't see reasons to be more visible.

Regards

Pavel



--
Euler Taveira

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

Предыдущее
От: "Euler Taveira"
Дата:
Сообщение: Re: Trigger position
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hook for extensible parsing.