Re: Trigger position

Поиск
Список
Период
Сортировка
От Marcos Pegoraro
Тема Re: Trigger position
Дата
Msg-id CAB-JLwZykhC-5F+HtimhUv-GGuUcP-bhM3ysrtg1zdPksRU9-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger position  ("Euler Taveira" <euler@eulerto.com>)
Список pgsql-hackers
We can run triggers using position only, this way we don´t have these few cycles to determine ordering.
On creation time we populate position, even if it's not set, so for the first time position will match trigger names. When user changes a trigger position we sum 1 to the followers.

regards,
Marcos 

Em qua., 15 de set. de 2021 às 12:13, Euler Taveira <euler@eulerto.com> escreveu:
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.


--
Euler Taveira

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

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Re: Trigger position
Следующее
От: John Naylor
Дата:
Сообщение: Re: mark the timestamptz variant of date_bin() as stable