summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-12-23 13:21:41 +0100
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-12-23 13:21:41 +0100
commit2655ecde2c3313e1f9bc158faee884417252bc38 (patch)
treeb39f90da5e4597d2f0d4729b8745e4496cfa1147
parent9c48a0f00011c45d9a7b8903ffbecd286cf46de0 (diff)
Fix event trigger example
Commit 2f9661311b changed command tags from strings to numbers, but forgot to adjust the code in the event trigger example, which consequently failed to compile. While fixing that, improve the indentation to adhere to pgindent style. Backpatch to v13, where the change was introduced. Author: Laurenz Albe Discussion: https://postgr.es/m/81e36ac17dc80489e74dc5b6914afa6ccdb1a99d.camel@cybertec.at
-rw-r--r--doc/src/sgml/event-trigger.sgml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml
index f1235a2c9f7..3b6a5361b34 100644
--- a/doc/src/sgml/event-trigger.sgml
+++ b/doc/src/sgml/event-trigger.sgml
@@ -1194,8 +1194,9 @@ noddl(PG_FUNCTION_ARGS)
trigdata = (EventTriggerData *) fcinfo->context;
ereport(ERROR,
- (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("command \"%s\" denied", trigdata->tag)));
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("command \"%s\" denied",
+ GetCommandTagName(trigdata->tag))));
PG_RETURN_NULL();
}