]> granicus.if.org Git - postgresql/commit
Represent columns requiring insert and update privileges indentently.
authorAndres Freund <andres@anarazel.de>
Thu, 7 May 2015 22:20:46 +0000 (00:20 +0200)
committerAndres Freund <andres@anarazel.de>
Thu, 7 May 2015 22:20:46 +0000 (00:20 +0200)
commit2c8f4836db058d0715bc30a30655d646287ba509
tree31576f5fc453bd2dbc5642c1281640b5eb959307
parentdb5f98ab4fa44bc563ec62d7b1aada4fc276d9b2
Represent columns requiring insert and update privileges indentently.

Previously, relation range table entries used a single Bitmapset field
representing which columns required either UPDATE or INSERT privileges,
despite the fact that INSERT and UPDATE privileges are separately
cataloged, and may be independently held.  As statements so far required
either insert or update privileges but never both, that was
sufficient. The required permission could be inferred from the top level
statement run.

The upcoming INSERT ... ON CONFLICT UPDATE feature needs to
independently check for both privileges in one statement though, so that
is not sufficient anymore.

Bumps catversion as stored rules change.

Author: Peter Geoghegan
Reviewed-By: Andres Freund
18 files changed:
contrib/postgres_fdw/postgres_fdw.c
contrib/sepgsql/dml.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/trigger.c
src/backend/executor/execMain.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/prep/prepsecurity.c
src/backend/optimizer/prep/prepunion.c
src/backend/parser/analyze.c
src/backend/parser/parse_relation.c
src/backend/rewrite/rewriteHandler.c
src/include/catalog/catversion.h
src/include/nodes/parsenodes.h