Re: Trigger position

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: Trigger position
Дата
Msg-id 80713837-d77b-dd8d-09bd-d93520a130a2@proxel.se
обсуждение исходный текст
Ответ на Re: Trigger position  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Trigger position  (Marcos Pegoraro <marcos@f10.com.br>)
Список pgsql-hackers
On 9/15/21 1:40 PM, Tom Lane wrote:
> Marcos Pegoraro <marcos@f10.com.br> writes:
>> Alphabetical order of triggers sometimes makes me write a_Recalc or z_Calc
>> to be sure it´ll be the first or the last trigger with same event of that
>> table
> 
>> Oracle and SQL Server have FOLLOWS and PRECEDES when defining trigger
>> execution order. Firebird has POSITION, which I like it more.
> 
> Color me skeptical: doesn't that introduce more complication without
> fundamentally solving anything?  You still don't know which position
> numbers other triggers have used, so it seems like this is just a
> different way to spell the same problem.

I guess one advantage is that it would make the intent of the DDL author 
more clear to a reader and that it also makes it more clear to people 
new to PostgreSQL that trigger order is something that is important to 
reason about.

If those small advantages are worth the complication is another question 
(I am skpetical), but if we would implement this I prefer the Firebird 
solution over the Oralce/MSSQL solution since the Firebird solution is 
simpler while achieving the same thing plus that the Firefird solution 
seems like it would be obviously backwards compatible with our current 
solution.

Andreas



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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Column Filtering in Logical Replication