pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedOmission in GRANT documentation
3+ messages / 2 participants
[nested] [flat]
* Omission in GRANT documentation
@ 2017-10-10 07:34 Laurenz Albe <laurenz.albe@cybertec.at>
2017-10-11 20:58 ` Re: Omission in GRANT documentation Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Laurenz Albe @ 2017-10-10 07:34 UTC (permalink / raw)
To: pgsql-hackers
grant.sgml says that
the default privileges granted to PUBLIC are as follows: CONNECT and
CREATE TEMP TABLE for databases; EXECUTE privilege for functions;
and USAGE privilege for languages.
But types also have the USAGE privilege for PUBLIC by default:
test=> CREATE TYPE bug_status AS ENUM ('new', 'open', 'closed');
CREATE TYPE
test=> GRANT USAGE ON TYPE bug_status TO duff;
GRANT
test=> REVOKE USAGE ON TYPE bug_status FROM duff;
REVOKE
test=> \dT+ bug_status
List of data types
Schema | Name | ... | Owner | Access privileges | ...
--------+------------+-----+---------+-------------------+-----
public | bug_status | | laurenz | =U/laurenz +|
| | | | laurenz=U/laurenz |
(1 row)
Hence I propose the attached documentation patch.
Yours,
Laurenz Albe
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Attachments:
[text/x-patch] 0001-Fix-documentation-of-default-privileges-for-types.patch (1.2K, ../../1507620895.4152.1.camel@cybertec.at/2-0001-Fix-documentation-of-default-privileges-for-types.patch)
download | inline diff:
From e1213e1e91cd0c45fcca8df492f1017f2eacc4bc Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@wien.gv.at>
Date: Tue, 10 Oct 2017 09:21:36 +0200
Subject: [PATCH] Fix documentation of default privileges for types
Document that PUBLIC has USAGE privileges on newly created types.
---
doc/src/sgml/ref/grant.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml
index c63252c..8936963 100644
--- a/doc/src/sgml/ref/grant.sgml
+++ b/doc/src/sgml/ref/grant.sgml
@@ -161,7 +161,7 @@ GRANT <replaceable class="PARAMETER">role_name</replaceable> [, ...] TO <replace
granted to <literal>PUBLIC</literal> are as follows:
<literal>CONNECT</literal> and <literal>CREATE TEMP TABLE</literal> for
databases; <literal>EXECUTE</literal> privilege for functions; and
- <literal>USAGE</literal> privilege for languages.
+ <literal>USAGE</literal> privilege for languages and types.
The object owner can, of course, <command>REVOKE</command>
both default and expressly granted privileges. (For maximum
security, issue the <command>REVOKE</> in the same transaction that
--
2.9.5
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Omission in GRANT documentation
2017-10-10 07:34 Omission in GRANT documentation Laurenz Albe <laurenz.albe@cybertec.at>
@ 2017-10-11 20:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-10-12 07:27 ` Re: Omission in GRANT documentation Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2017-10-11 20:58 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> grant.sgml says that
> the default privileges granted to PUBLIC are as follows: CONNECT and
> CREATE TEMP TABLE for databases; EXECUTE privilege for functions;
> and USAGE privilege for languages.
> But types also have the USAGE privilege for PUBLIC by default:
Yup, that's an oversight.
> Hence I propose the attached documentation patch.
Pushed, with a bit of additional wordsmithing.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Omission in GRANT documentation
2017-10-10 07:34 Omission in GRANT documentation Laurenz Albe <laurenz.albe@cybertec.at>
2017-10-11 20:58 ` Re: Omission in GRANT documentation Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-10-12 07:27 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 3+ messages in thread
From: Laurenz Albe @ 2017-10-12 07:27 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers
Tom Lane wrote:
>> But types also have the USAGE privilege for PUBLIC by default:
>
> Yup, that's an oversight.
>
>> Hence I propose the attached documentation patch.
>
> Pushed, with a bit of additional wordsmithing.
Thanks for taking the time.
Yours,
Laurenz Albe
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-10-12 07:27 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 07:34 Omission in GRANT documentation Laurenz Albe <laurenz.albe@cybertec.at>
2017-10-11 20:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-10-12 07:27 ` Laurenz Albe <laurenz.albe@cybertec.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox