Re: extension patch of CREATE OR REPLACE TRIGGER

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: extension patch of CREATE OR REPLACE TRIGGER
Дата
Msg-id CAHut+PsBv+Drs2V-2YT42YnJBCqKvs2OdxFo=7tSReiHDd=j+w@mail.gmail.com
обсуждение исходный текст
Ответ на RE: extension patch of CREATE OR REPLACE TRIGGER  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Ответы RE: extension patch of CREATE OR REPLACE TRIGGER
Список pgsql-hackers
On Tue, Sep 8, 2020 at 9:36 PM osumi.takamichi@fujitsu.com
<osumi.takamichi@fujitsu.com> wrote:
>
> I've fixed all except one point.

Thanks for addressing my previous review comments in your new v09 patch.

Those are fixed OK now, but I found 2 new review points.

====

COMMENT trigger.c (typo)

+ ereport(ERROR,
+ (errcode(ERRCODE_DUPLICATE_OBJECT),
+ errmsg("trigger \"%s\" for relation \"%s\" is a constraint trigger",
+ stmt->trigname, RelationGetRelationName(rel)),
+ errhint("use CREATE OR REPLACE CONSTRAINT TRIGGER to replace a
costraint trigger")));


Typo in the errhint text.
"costraint" -> "constraint"

====

COMMENT create_trigger.sgmg (add more help?)

I noticed that the CREATE OR REPLACE FUNCTION help [1] describes the
OR REPLACE syntax ("Description" section) and also mentions some of
the restrictions when using REPLACE ("Notes" section).
[1] - https://www.postgresql.org/docs/current/sql-createfunction.html

~~
OTOH this trigger patch does not add anything much at all in the trigger help.

Shouldn't the "Description" at least say something like:
"CREATE OR REPLACE will either create a new trigger, or replace an
existing definition."

Shouldn't the "Notes" include information about restrictions when
using OR REPLACE
e.g. cannot replace triggers with triggers of a different kind
e.g. cannot replace triggers with pending events

What do you think?

====

Kind Regards,
Peter Smith.
Fujitsu Australia



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions