]> granicus.if.org Git - postgresql/commit
Rename pg_rowsecurity -> pg_policy and other fixes
authorStephen Frost <sfrost@snowman.net>
Thu, 27 Nov 2014 06:06:36 +0000 (01:06 -0500)
committerStephen Frost <sfrost@snowman.net>
Thu, 27 Nov 2014 06:15:57 +0000 (01:15 -0500)
commit143b39c1855f8a22f474f20354ee5ee5d2f4d266
tree3633add36a9bb7a6a035d94077f6245e71f93acd
parent1812ee5767a25a36e7002be8a3a032357d3fe4e2
Rename pg_rowsecurity -> pg_policy and other fixes

As pointed out by Robert, we should really have named pg_rowsecurity
pg_policy, as the objects stored in that catalog are policies.  This
patch fixes that and updates the column names to start with 'pol' to
match the new catalog name.

The security consideration for COPY with row level security, also
pointed out by Robert, has also been addressed by remembering and
re-checking the OID of the relation initially referenced during COPY
processing, to make sure it hasn't changed under us by the time we
finish planning out the query which has been built.

Robert and Alvaro also commented on missing OCLASS and OBJECT entries
for POLICY (formerly ROWSECURITY or POLICY, depending) in various
places.  This patch fixes that too, which also happens to add the
ability to COMMENT on policies.

In passing, attempt to improve the consistency of messages, comments,
and documentation as well.  This removes various incarnations of
'row-security', 'row-level security', 'Row-security', etc, in favor
of 'policy', 'row level security' or 'row_security' as appropriate.

Happy Thanksgiving!
47 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/ref/alter_policy.sgml
doc/src/sgml/ref/create_policy.sgml
doc/src/sgml/ref/drop_policy.sgml
doc/src/sgml/rules.sgml
src/backend/catalog/Makefile
src/backend/catalog/dependency.c
src/backend/catalog/objectaddress.c
src/backend/catalog/system_views.sql
src/backend/commands/copy.c
src/backend/commands/event_trigger.c
src/backend/commands/functioncmds.c
src/backend/commands/policy.c
src/backend/commands/tablecmds.c
src/backend/executor/execMain.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/backend/parser/gram.y
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rowsecurity.c
src/backend/utils/cache/plancache.c
src/backend/utils/cache/relcache.c
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c
src/bin/psql/describe.c
src/bin/psql/tab-complete.c
src/include/catalog/catversion.h
src/include/catalog/dependency.h
src/include/catalog/indexing.h
src/include/catalog/pg_class.h
src/include/catalog/pg_policy.h [new file with mode: 0644]
src/include/catalog/pg_rowsecurity.h [deleted file]
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/rewrite/rowsecurity.h
src/include/utils/plancache.h
src/include/utils/rel.h
src/test/regress/expected/rowsecurity.out
src/test/regress/expected/rules.out
src/test/regress/expected/sanity_check.out
src/test/regress/sql/rowsecurity.sql