pgsql: Fix CreatePolicy, pg_dump -v; psql and doc updates

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix CreatePolicy, pg_dump -v; psql and doc updates
Date: 2014-10-03 20:33:20
Message-ID: E1Xa9XU-00087W-LF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix CreatePolicy, pg_dump -v; psql and doc updates

Peter G pointed out that valgrind was, rightfully, complaining about
CreatePolicy() ending up copying beyond the end of the parsed policy
name. Name is a fixed-size type and we need to use namein (through
DirectFunctionCall1()) to flush out the entire array before we pass
it down to heap_form_tuple.

Michael Paquier pointed out that pg_dump --verbose was missing a
newline and Fabrízio de Royes Mello further pointed out that the
schema was also missing from the messages, so fix those also.

Also, based on an off-list comment from Kevin, rework the psql \d
output to facilitate copy/pasting into a new CREATE or ALTER POLICY
command.

Lastly, improve the pg_policies view and update the documentation for
it, along with a few other minor doc corrections based on an off-list
discussion with Adam Brightwell.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/78d72563ef141ddc507ddd5ae77db613a309041a

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 91 +++++++++++++++++++++++++++++++++-
src/backend/catalog/system_views.sql | 10 ++--
src/backend/commands/policy.c | 2 +-
src/bin/pg_dump/pg_dump.c | 6 ++-
src/bin/psql/describe.c | 28 ++++++-----
src/test/regress/expected/rules.out | 12 ++---
6 files changed, 122 insertions(+), 27 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-10-03 21:46:29 pgsql: Update time zone abbreviations lists.
Previous Message Tom Lane 2014-10-03 18:48:58 pgsql: Fix bogus logic for zic -P option.