Re: Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL
Дата
Msg-id CAKFQuwaDdxxH97e4HONKxvGE7OyvPGAm6bkfL+wV3vbkAzr3BQ@mail.gmail.com
обсуждение исходный текст
Ответ на Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL  (Peter Burbery <petercullenburbery@gmail.com>)
Список pgsql-hackers
On Friday, May 3, 2024, Peter Burbery <petercullenburbery@gmail.com> wrote:
Dear pgsql-hackers,

One-line Summary:
Proposal to introduce the CREATE OR REPLACE syntax for EVENT TRIGGER in PostgreSQL.

Business Use-case:
Currently, to modify an EVENT TRIGGER, one must drop and recreate it. This proposal aims to introduce a CREATE OR REPLACE syntax for EVENT TRIGGER, similar to other database objects in PostgreSQL, to simplify this process and improve usability.

Contact Information:
Peter Burbery
peter.cullen.burbery@gmail.com

I look forward to your feedback on this proposal.

Its doesn’t seem like that big an omission, especially since unlike views and functions you can’t actually affect dependencies on an event trigger.  But the same can be said of normal triggers and they already have an “or replace” option.  So, sure, if you come along and offer a patch for this it seems probable it would be accepted.  I’d just be a bit sad it probably would take away from time that could spent on more desirable features.

As for your proposal format, it is a quite confusing presentation to send to an open source project.  Also, your examples are overly complex, and crammed together, for the purpose and not enough effort is spent actually trying to demonstrate why this is needed when “drop if exists” already is present.  A much better flow is to conditionally drop the existing object and create the new one all in the same transaction.

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Use generation memory context for tuplestore.c
Следующее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: UUID v7