From: Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: doc sql-grant.html Synopsis error?
Date: Sat, 8 Apr 2023 16:07:36 +0300
Message-ID: <00828709-45d1-f82d-e270-7c9d4d52373e@cloud.gatewaynet.com> (raw)
In-Reply-To: <CACJufxFjD1=HzPUYC=03G-iUPtj+_NYHD+qpSfPrjmPz3hyLPQ@mail.gmail.com>
References: <CACJufxFjD1=HzPUYC=03G-iUPtj+_NYHD+qpSfPrjmPz3hyLPQ@mail.gmail.com>
Στις 8/4/23 15:58, ο/η jian he έγραψε:
>
> Hi.
> --work as intended.
> grant ALL PRIVILEGES on FUNCTION pg_catalog.pg_reload_conf() to test;
> grant ALL PRIVILEGES on FUNCTION pg_reload_conf() to test;
>
> -------------errors. it should be work, or I interpret the doc the
> wrong way?
> GRANT ALL PRIVILEGES ON FUNCTION pg_reload_conf() IN SCHEMA pg_catalog
> TO test;
> GRANT ALL PRIVILEGES ON FUNCTION pg_catalog.pg_reload_conf() IN SCHEMA
> pg_catalog TO test;
>
> doc: https://www.postgresql.org/docs/current/sql-grant.html
> GRANT { EXECUTE | ALL [ PRIVILEGES ] }
> ON { { FUNCTION | PROCEDURE | ROUTINE }/|routine_name|/ [ ( [ [/|argmode|/ ] [/|arg_name|/ ]/|arg_type|/ [, ...] ] ) ] [, ...]
> | ALL { FUNCTIONS | PROCEDURES | ROUTINES } IN SCHEMA/|schema_name|/ [, ...] }
> TO/|role_specification|/ [, ...] [ WITH GRANT OPTION ]
> [ GRANTED BY/|role_specification|/ ]
> I am using postgres 16, but the grant function part does not change.
> What did I miss?
Hello, You missed the docs. The "IN SCHEMA" version always goes with ALL
FUNCTIONS in the beginning. What would be the point specifying
pg_catalog.pg_reload_conf() IN SCHEMA pg_catalog, i.e. giving the SCHEMA
twice ?
--
Achilleas Mantzios
IT DEV - HEAD
IT DEPT
Dynacom Tankers Mgmt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: a.mantzios@cloud.gatewaynet.com
Subject: Re: doc sql-grant.html Synopsis error?
In-Reply-To: <00828709-45d1-f82d-e270-7c9d4d52373e@cloud.gatewaynet.com>
References: <CACJufxFjD1=HzPUYC=03G-iUPtj+_NYHD+qpSfPrjmPz3hyLPQ@mail.gmail.com> <00828709-45d1-f82d-e270-7c9d4d52373e@cloud.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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