has_function_privilege()

Started by Stefan Hansabout 22 years ago2 messagesbugs
Jump to latest
#1Stefan Hans
shans@tanagra.de

Seems like a bug to me.

PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5):

my_example=# select has_function_privilege('postgres', 'cash_cmp', 'execute');
ERROR: expected a left parenthesis
my_example=# select has_function_privilege('cash_cmp', 'execute');
ERROR: expected a left parenthesis

Stefan

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Stefan Hans (#1)
Re: has_function_privilege()

"Stefan Hans" <shans@tanagra.de> writes:

Seems like a bug to me.

my_example=# select has_function_privilege('postgres', 'cash_cmp', 'execute');
ERROR: expected a left parenthesis

Maybe a docs bug. You need a complete function signature, since after
all there could be many functions named cash_cmp:

regression=# select has_function_privilege('postgres', 'cash_cmp(money,money)', 'execute');
has_function_privilege
------------------------
t
(1 row)

The documentation for has_function_privilege() is desperately in need of
an example, methinks. [ checks CVS logs... ] Hmm, looks like this is
my fault, too :-(. I'll get on it.

regards, tom lane