summaryrefslogtreecommitdiff
path: root/src/include/commands/trigger.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-12-15 18:51:46 -0500
committerRobert Haas <rhaas@postgresql.org>2011-12-15 19:02:38 -0500
commit74a1d4fe7cc092076806767925d6f34ea347efde (patch)
tree4aec82c1cc22d267358d7216e7ec78650ee05f9f /src/include/commands/trigger.h
parentd039fd51f79e9ddde4d692d2b396bdf5722b4c4e (diff)
downloadpostgresql-74a1d4fe7cc092076806767925d6f34ea347efde.tar.gz
Improve behavior of concurrent rename statements.
Previously, renaming a table, sequence, view, index, foreign table, column, or trigger checked permissions before locking the object, which meant that if permissions were revoked during the lock wait, we would still allow the operation. Similarly, if the original object is dropped and a new one with the same name is created, the operation will be allowed if we had permissions on the old object; the permissions on the new object don't matter. All this is now fixed. Along the way, attempting to rename a trigger on a foreign table now gives the same error message as trying to create one there in the first place (i.e. that it's not a table or view) rather than simply stating that no trigger by that name exists. Patch by me; review by Noah Misch.
Diffstat (limited to 'src/include/commands/trigger.h')
-rw-r--r--src/include/commands/trigger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index e7d28f7cdd..4e3fb7db80 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -115,7 +115,7 @@ extern Oid CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
extern void RemoveTriggerById(Oid trigOid);
extern Oid get_trigger_oid(Oid relid, const char *name, bool missing_ok);
-extern void renametrig(Oid relid, const char *oldname, const char *newname);
+extern void renametrig(RenameStmt *stmt);
extern void EnableDisableTrigger(Relation rel, const char *tgname,
char fires_when, bool skip_system);