Re: Trigger position

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: daniel(at)yesql(dot)se, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger position
Date: 2021-09-15 15:10:34
Message-ID: CAB-JLwZoeig2KdZvREA=96-humAAiGMBHkfLTwCz1yQLQm9aFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When I was writing my initial email I was remembering exactly this, my
first basic programs.
I would like this feature more because I sometimes have a mess of triggers
when this trigger function is fired on several tables and it needs to be
the first on this table but not on that table. And usually trigger names
have same names as their functions, so for this table I have to have a
different name just to be fired first.

Em qua., 15 de set. de 2021 às 10:51, Alvaro Herrera <
alvherre(at)alvh(dot)no-ip(dot)org> escreveu:

> 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)
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2021-09-15 15:13:29 Re: Trigger position
Previous Message Pavel Stehule 2021-09-15 15:08:29 Re: Hook for extensible parsing.