Re: Command Triggers, v16 - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Command Triggers, v16
Date
Msg-id m2zkbg4kvs.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Command Triggers, v16  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> there has to be some way to do that without breaking command triggers.

Sure, special case the switch branch in utility.c so as to return a
different command tag for ALTER TABLE and ALTER FOREIGN TABLE. For
precedents, see AlterObjectTypeCommandTag(ObjectType objtype) and
case T_DropStmt:    switch (((DropStmt *) parsetree)->removeType)
case T_DefineStmt:    switch (((DefineStmt *) parsetree)->kind)

So, do we want to do the same thing for ALTER FOREIGN TABLE, and should
I do that in the command triggers patch?

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Command Triggers, v16
Next
From: Robert Haas
Date:
Subject: Re: initdb and fsync