Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6c7e6d2

Browse files
committed
Add a usage example for has_function_privilege().
1 parent 0fdc6c4 commit 6c7e6d2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/src/sgml/func.sgml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.194 2004/03/10 20:10:26 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.195 2004/03/19 19:13:26 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -6881,15 +6881,19 @@ SELECT has_table_privilege('myschema.mytable', 'select');
68816881
arguments are analogous to <function>has_table_privilege</function>.
68826882
When specifying a function by a text string rather than by OID,
68836883
the allowed input is the same as for the <type>regprocedure</> data type.
6884-
The desired access privilege type must currently evaluate to
6884+
The desired access privilege type must evaluate to
68856885
<literal>EXECUTE</literal>.
6886+
An example is:
6887+
<programlisting>
6888+
SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
6889+
</programlisting>
68866890
</para>
68876891

68886892
<para>
68896893
<function>has_language_privilege</function> checks whether a user
68906894
can access a procedural language in a particular way. The possibilities
68916895
for its arguments are analogous to <function>has_table_privilege</function>.
6892-
The desired access privilege type must currently evaluate to
6896+
The desired access privilege type must evaluate to
68936897
<literal>USAGE</literal>.
68946898
</para>
68956899

0 commit comments

Comments
 (0)