pgsql: Provide the OR REPLACE option for CREATE TRIGGER.
От | Tom Lane |
---|---|
Тема | pgsql: Provide the OR REPLACE option for CREATE TRIGGER. |
Дата | |
Msg-id | E1ke3g2-0005xw-Hz@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Provide the OR REPLACE option for CREATE TRIGGER. This is mostly straightforward. However, we disallow replacing constraint triggers or changing the is-constraint property; perhaps that can be added later, but the complexity versus benefit tradeoff doesn't look very good. Also, no special thought is taken here for whether replacing an existing trigger should result in changes to queued-but-not-fired trigger actions. We just document that if you're surprised by the results, too bad, don't do that. (Note that any such pending trigger activity would have to be within the current session.) Takamichi Osumi, reviewed at various times by Surafel Temesgen, Peter Smith, and myself Discussion: https://postgr.es/m/0DDF369B45A1B44B8A687ED43F06557C010BC362@G01JPEXMBYT03 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/92bf7e2d027466d750b4ac5b026f6f4ac29be881 Modified Files -------------- doc/src/sgml/ref/create_trigger.sgml | 76 +++++++++----- src/backend/catalog/index.c | 7 +- src/backend/commands/tablecmds.c | 28 +++--- src/backend/commands/trigger.c | 174 +++++++++++++++++++++++---------- src/backend/nodes/copyfuncs.c | 3 +- src/backend/nodes/equalfuncs.c | 3 +- src/backend/parser/gram.y | 52 +++++----- src/include/nodes/parsenodes.h | 3 +- src/test/regress/expected/triggers.out | 89 +++++++++++++++++ src/test/regress/sql/triggers.sql | 87 +++++++++++++++++ 10 files changed, 408 insertions(+), 114 deletions(-)
В списке pgsql-committers по дате отправления: