pgsql: Rename pg_rowsecurity -> pg_policy and other fixes

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема pgsql: Rename pg_rowsecurity -> pg_policy and other fixes
Дата
Msg-id E1XtsN7-0001Yp-QR@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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!

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/143b39c1855f8a22f474f20354ee5ee5d2f4d266

Modified Files
--------------
doc/src/sgml/catalogs.sgml                 |   44 ++--
doc/src/sgml/ddl.sgml                      |    4 +-
doc/src/sgml/ref/alter_policy.sgml         |    4 +-
doc/src/sgml/ref/create_policy.sgml        |   49 +++--
doc/src/sgml/ref/drop_policy.sgml          |   16 +-
doc/src/sgml/rules.sgml                    |    2 +-
src/backend/catalog/Makefile               |    2 +-
src/backend/catalog/dependency.c           |   11 +-
src/backend/catalog/objectaddress.c        |   58 +++--
src/backend/catalog/system_views.sql       |   18 +-
src/backend/commands/copy.c                |   48 ++++-
src/backend/commands/event_trigger.c       |    2 +-
src/backend/commands/functioncmds.c        |    6 +-
src/backend/commands/policy.c              |  317 ++++++++++++++--------------
src/backend/commands/tablecmds.c           |   19 +-
src/backend/executor/execMain.c            |    2 +-
src/backend/optimizer/path/allpaths.c      |    2 +-
src/backend/optimizer/plan/planner.c       |    6 +-
src/backend/optimizer/plan/setrefs.c       |    8 +-
src/backend/parser/gram.y                  |   11 +-
src/backend/rewrite/rewriteHandler.c       |    4 +-
src/backend/rewrite/rowsecurity.c          |   14 +-
src/backend/utils/cache/plancache.c        |    8 +-
src/backend/utils/cache/relcache.c         |    4 +-
src/bin/pg_dump/common.c                   |    4 +-
src/bin/pg_dump/pg_backup_archiver.c       |    1 +
src/bin/pg_dump/pg_dump.c                  |  185 ++++++++--------
src/bin/pg_dump/pg_dump.h                  |   26 +--
src/bin/pg_dump/pg_dump_sort.c             |   12 +-
src/bin/psql/describe.c                    |   44 ++--
src/bin/psql/tab-complete.c                |    2 +-
src/include/catalog/catversion.h           |    2 +-
src/include/catalog/dependency.h           |    2 +-
src/include/catalog/indexing.h             |    8 +-
src/include/catalog/pg_class.h             |    2 +-
src/include/catalog/pg_policy.h            |   53 +++++
src/include/catalog/pg_rowsecurity.h       |   53 -----
src/include/nodes/parsenodes.h             |    2 +-
src/include/nodes/plannodes.h              |    2 +-
src/include/nodes/relation.h               |    2 +-
src/include/rewrite/rowsecurity.h          |    6 +-
src/include/utils/plancache.h              |    4 +-
src/include/utils/rel.h                    |    2 +-
src/test/regress/expected/rowsecurity.out  |   54 ++---
src/test/regress/expected/rules.out        |   18 +-
src/test/regress/expected/sanity_check.out |    2 +-
src/test/regress/sql/rowsecurity.sql       |   16 +-
47 files changed, 616 insertions(+), 545 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: action_at_recovery_target recovery config option
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Free libxml2/libxslt resources in a safer order.