diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml index e39b925c5da5d971c8c3ab14632a2a8926a1e390..59b0d8148e7d73f227118a7851b7098dd6f07f73 100644 --- a/doc/src/sgml/ref/grant.sgml +++ b/doc/src/sgml/ref/grant.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/grant.sgml,v 1.38 2003/11/29 19:51:39 pgsql Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/grant.sgml,v 1.39 2004/03/22 03:38:24 momjian Exp $ PostgreSQL documentation --> @@ -285,10 +285,10 @@ GRANT { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] } <programlisting> => \z mytable - Access privileges for database "lusitania" - Schema | Table | Access privileges ---------+---------+--------------------------------------- - public | mytable | {=r/postgres,miriam=arwdRxt/postgres,"group todos=arw/postgres"} + Access privileges for database "lusitania" + Schema | Name | Type | Access privileges +--------+---------+-------+----------------------------------------------------------------- + public | mytable | table | {=r/postgres,miriam=arwdRxt/postgres,"group todos=arw/postgres"} (1 row) </programlisting> The entries shown by <command>\z</command> are interpreted thus: diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index c9f0278ec907a0d499efb442312fb38ede271199..e996bd6e428a74d220ab64d03908cd5828525cb6 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.106 2004/02/13 05:10:02 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.107 2004/03/22 03:38:24 momjian Exp $ PostgreSQL documentation --> @@ -995,10 +995,10 @@ testdb=> <term><literal>\dp</literal> [ <replaceable class="parameter">pattern</replaceable> ]</term> <listitem> <para> - Produces a list of all available tables with their + Produces a list of all available tables, views and sequences with their associated access privileges. If <replaceable class="parameter">pattern</replaceable> is - specified, only tables whose names match the pattern are listed. + specified, only tables, views and sequences whose names match the pattern are listed. </para> <para> @@ -1695,10 +1695,10 @@ lo_import 152801 <term><literal>\z</literal> [ <replaceable class="parameter">pattern</replaceable> ]</term> <listitem> <para> - Produces a list of all available tables with their + Produces a list of all available tables, views and sequences with their associated access privileges. If a <replaceable class="parameter">pattern</replaceable> is - specified, only tables whose names match the pattern are listed. + specified, only tables,views and sequences whose names match the pattern are listed. </para> <para> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 4fc493058f59ddf1fd71a46ef401867db4b7315f..3efb5d16db81738e60cf44bdf9e18926080b26e6 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.94 2004/01/25 03:07:22 neilc Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.95 2004/03/22 03:38:24 momjian Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -351,11 +351,12 @@ permissionsList(const char *pattern) printfPQExpBuffer(&buf, "SELECT n.nspname as \"%s\",\n" " c.relname as \"%s\",\n" + " CASE c.relkind WHEN 'r' THEN '%s' WHEN 'v' THEN '%s' WHEN 'S' THEN '%s' END as \"%s\",\n" " c.relacl as \"%s\"\n" "FROM pg_catalog.pg_class c\n" " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" "WHERE c.relkind IN ('r', 'v', 'S')\n", - _("Schema"), _("Table"), _("Access privileges")); + _("Schema"), _("Name"), _("table"), _("view"), _("sequence"), _("Type"), _("Access privileges")); /* * Unless a schema pattern is specified, we suppress system and temp diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 7352688e245025cbd315313a7d0d58c9a909374f..a60c0a6520f7e38aae3276e152af34adc9276386 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.85 2004/01/09 21:15:51 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.86 2004/03/22 03:38:24 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -220,11 +220,11 @@ slashUsage(unsigned short int pager) fprintf(output, _(" \\dn [PATTERN] list schemas\n")); fprintf(output, _(" \\do [NAME] list operators\n")); fprintf(output, _(" \\dl list large objects, same as \\lo_list\n")); - fprintf(output, _(" \\dp [PATTERN] list table access privileges\n")); + fprintf(output, _(" \\dp [PATTERN] list table, view and sequence access privileges\n")); fprintf(output, _(" \\dT [PATTERN] list data types (add \"+\" for more detail)\n")); fprintf(output, _(" \\du [PATTERN] list users\n")); fprintf(output, _(" \\l list all databases (add \"+\" for more detail)\n")); - fprintf(output, _(" \\z [PATTERN] list table access privileges (same as \\dp)\n")); + fprintf(output, _(" \\z [PATTERN] list table, view and sequence access privileges (same as \\dp)\n")); fprintf(output, "\n"); fprintf(output, _("Formatting\n"));