Re: Trigger position

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Trigger position
Дата
Msg-id 202109151351.ds3s5qdazao2@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Trigger position  (Marcos Pegoraro <marcos@f10.com.br>)
Ответы Re: Trigger position  (Marcos Pegoraro <marcos@f10.com.br>)
Re: Trigger position  ("Euler Taveira" <euler@eulerto.com>)
Список pgsql-hackers
On 2021-Sep-15, Marcos Pegoraro wrote:

> This problem can raise ... there is a trigger foo using position 1, please
> choose another

This is reminiscent of the old BASIC programming language, where you
eventually learn to choose line numbers that aren't consecutive, so that
if you later have to add lines in between you have some room to do so.
(This happens when modifying a program sufficient times you are forced
to renumber old lines where you want to add new lines that no longer fit
in the sequence.)  It's a pretty bad system.

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.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/
"Nunca confiaré en un traidor.  Ni siquiera si el traidor lo he creado yo"
(Barón Vladimir Harkonnen)



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

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Re: On login trigger: take three
Следующее
От: Jim Mlodgenski
Дата:
Сообщение: Re: Hook for extensible parsing.