=> \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)
The entries shown by \z are interpreted thus:
\dp [ pattern ]
- 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 pattern is
- specified, only tables whose names match the pattern are listed.
+ specified, only tables, views and sequences whose names match the pattern are listed.
\z [ pattern ]
- 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 pattern is
- specified, only tables whose names match the pattern are listed.
+ specified, only tables,views and sequences whose names match the pattern are listed.
*
* 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"
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
*
* 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"
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"));