Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
a87f15d5
Commit
a87f15d5
authored
16 years ago
by
Andrew Dunstan
Browse files
Options
Downloads
Patches
Plain Diff
Display ACLS using multiple lines for psql's \z. Brendan Jurd.
parent
c0b1b01e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/ref/grant.sgml
+7
-5
7 additions, 5 deletions
doc/src/sgml/ref/grant.sgml
src/bin/psql/describe.c
+2
-2
2 additions, 2 deletions
src/bin/psql/describe.c
src/test/regress/expected/dependency.out
+10
-8
10 additions, 8 deletions
src/test/regress/expected/dependency.out
with
19 additions
and
15 deletions
doc/src/sgml/ref/grant.sgml
+
7
−
5
View file @
a87f15d5
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/grant.sgml,v 1.6
7
200
7/10/30 19:43:30 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/grant.sgml,v 1.6
8
200
8/05/05 01:21:03 adunstan
Exp $
PostgreSQL documentation
-->
...
...
@@ -405,10 +405,12 @@ GRANT <replaceable class="PARAMETER">role</replaceable> [, ...] TO <replaceable
to obtain information about existing privileges, for example:
<programlisting>
=> \z mytable
Access privileges for database "lusitania"
Schema | Name | Type | Access privileges
--------+---------+-------+---------------------------------------------------
public | mytable | table | {miriam=arwdxt/miriam,=r/miriam,admin=arw/miriam}
Access privileges for database "lusitania"
Schema | Name | Type | Access privileges
--------+---------+-------+----------------------
public | mytable | table | miriam=arwdxt/miriam
: =r/miriam
: admin=arw/miriam
(1 row)
</programlisting>
The entries shown by <command>\z</command> are interpreted thus:
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/describe.c
+
2
−
2
View file @
a87f15d5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.1
69
2008/05/05 0
0:11:31
adunstan Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.1
70
2008/05/05 0
1:21:03
adunstan Exp $
*/
#include
"postgres_fe.h"
#include
"describe.h"
...
...
@@ -493,7 +493,7 @@ permissionsList(const char *pattern)
"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
"
"
pg_catalog.array_to_string(c.relacl, E'
\\
n')
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
"
,
...
...
This diff is collapsed.
Click to expand it.
src/test/regress/expected/dependency.out
+
10
−
8
View file @
a87f15d5
...
...
@@ -68,19 +68,21 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "deptest_pkey" fo
GRANT ALL ON deptest1 TO regression_user2;
RESET SESSION AUTHORIZATION;
\z deptest1
Access privileges for database "regression"
Schema | Name | Type | Access privileges
--------+----------+-------+------------------------------------------------------------------------------------------------------------------------------------
public | deptest1 | table | {regression_user0=arwdxt/regression_user0,regression_user1=a*r*w*d*x*t*/regression_user0,regression_user2=arwdxt/regression_user1}
Access privileges for database "regression"
Schema | Name | Type | Access privileges
--------+----------+-------+------------------------------------------------
public | deptest1 | table | regression_user0=arwdxt/regression_user0
: regression_user1=a*r*w*d*x*t*/regression_user0
: regression_user2=arwdxt/regression_user1
(1 row)
DROP OWNED BY regression_user1;
-- all grants revoked
\z deptest1
Access privileges for database "regression"
Schema | Name | Type |
Access privileges
--------+----------+-------+------------------------------------------
--
public | deptest1 | table |
{
regression_user0=arwdxt/regression_user0
}
Access privileges for database "regression"
Schema | Name | Type | Access privileges
--------+----------+-------+------------------------------------------
public | deptest1 | table | regression_user0=arwdxt/regression_user0
(1 row)
-- table was dropped
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment