Allow LOCK TABLE .. ROW EXCLUSIVE MODE with INSERT
authorStephen Frost <sfrost@snowman.net>
Mon, 11 May 2015 19:44:12 +0000 (15:44 -0400)
committerStephen Frost <sfrost@snowman.net>
Mon, 11 May 2015 19:44:12 +0000 (15:44 -0400)
commitfa2642438f189c2b169ace3ac1df19533b9c7781
tree7a455813a35d03230771870778bd9a47962c916e
parent9d15292cfc581d2916778b79df0f0e86e032a677
Allow LOCK TABLE .. ROW EXCLUSIVE MODE with INSERT

INSERT acquires RowExclusiveLock during normal operation and therefore
it makes sense to allow LOCK TABLE .. ROW EXCLUSIVE MODE to be executed
by users who have INSERT rights on a table (even if they don't have
UPDATE or DELETE).

Not back-patching this as it's a behavior change which, strictly
speaking, loosens security restrictions.

Per discussion with Tom and Robert (circa 2013).
doc/src/sgml/ref/lock.sgml
src/backend/commands/lockcmds.c