Re: Documentation does not describes format for access privileges: =Tc/user

2023-12-25 Thread Tom Lane
"David G. Johnston"  writes:
> We probably should write the syntax like we do everywhere else:
> [grantee]={privilege[*]}[…]/grantor
> Then define the placeholders in the subsequent paragraph.

Seems reasonable.  About like this?

regards, tom lane

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index d2951cd754..664361a724 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2318,8 +2318,12 @@ REVOKE ALL ON accounts FROM PUBLIC;
 aclitem

The privileges that have been granted for a particular object are
-   displayed as a list of aclitem entries, where each
-   aclitem describes the permissions of one grantee that
+   displayed as a list of aclitem entries, each having the
+   format:
+
+grantee=privilege-abbreviations/grantor
+
+   Each aclitem describes the permissions of one grantee that
have been granted by a particular grantor.  For example,
calvin=r*w/hobbes specifies that the role
calvin has the privilege


Re: Documentation does not describes format for access privileges: =Tc/user

2023-12-25 Thread David G. Johnston
On Monday, December 25, 2023, David G. Johnston 
wrote:

> On Monday, December 25, 2023, Eugen Konkov  wrote:
>
>> No, it does not. If you refer to `An empty grantee field in an aclitem
>> stands for PUBLIC.` then "grantee field" was never described. What is
>> this?
>>
>> It would be very clear if it was described in this way:
>> The access privileges has the following format: "grantee=privileges/who
>> grants".
>>
>>
> Yes, it requires a bit of mental gymnastics to read.  The description says
> Calvin is the role being granted the privileges which makes that the
> grantee and Calvin is listed before the equal sign in the reference.
>
> “Who grants” is the “grantor”.
>
> I’ll accept that this can be improved but aside from a dictionary
> definition of grantee, which we don’t usually do, everything is shown.
>

We probably should write the syntax like we do everywhere else:

[grantee]={privilege[*]}[…]/grantor

Then define the placeholders in the subsequent paragraph.

David J.


Re: Documentation does not describes format for access privileges: =Tc/user

2023-12-25 Thread David G. Johnston
On Monday, December 25, 2023, Eugen Konkov  wrote:

> No, it does not. If you refer to `An empty grantee field in an aclitem
> stands for PUBLIC.` then "grantee field" was never described. What is
> this?
>
> It would be very clear if it was described in this way:
> The access privileges has the following format: "grantee=privileges/who
> grants".
>
>
Yes, it requires a bit of mental gymnastics to read.  The description says
Calvin is the role being granted the privileges which makes that the
grantee and Calvin is listed before the equal sign in the reference.

“Who grants” is the “grantor”.

I’ll accept that this can be improved but aside from a dictionary
definition of grantee, which we don’t usually do, everything is shown.

David J.