diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-03-22 03:38:24 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-03-22 03:38:24 +0000 |
commit | 3ceda5eab3dfc72fac991413331fee306940b537 (patch) | |
tree | 0773a5719fad258010acb5076458ce7b9185623e /src | |
parent | a7f074732042dc408343af12bd5331ff97196e24 (diff) | |
download | postgresql-3ceda5eab3dfc72fac991413331fee306940b537.tar.gz postgresql-3ceda5eab3dfc72fac991413331fee306940b537.zip |
I just noticed that \dp outputs "Table" to indicate relations (tables,
sequences and views). This patch allows it to handle views and
sequences.
Euler Taveira de Oliveira
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/describe.c | 5 | ||||
-rw-r--r-- | src/bin/psql/help.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 4fc493058f5..3efb5d16db8 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 7352688e245..a60c0a6520f 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")); |