BUG #1571: Cannot grant execute functions to non-superusers - Mailing list pgsql-bugs

From CaT
Subject BUG #1571: Cannot grant execute functions to non-superusers
Date
Msg-id 20050331000756.CE4F7F0E4D@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1571: Cannot grant execute functions to non-superusers  (CaT <cat@zip.com.au>)
Re: BUG #1571: Cannot grant execute functions to non-superusers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1571
Logged by:          CaT
Email address:      cat@zip.com.au
PostgreSQL version: 7.4.7
Operating system:   Linux (Debian woody with backports.org pgsql)
Description:        Cannot grant execute functions to non-superusers
Details:

Basically, I just cannot get my nonsuperuser access to the functions I
import. Aparently this works for 8.0 but I'm using 7.4.7 and its gone all
wibbly.


CREATE OR REPLACE FUNCTION gen_salt(text) RETURNS text AS
'$libdir/pgcrypto', 'pg_gen_salt' LANGUAGE 'C';
...
postgres=# \df+ gen_salt
                                                  List of functions
 Result data type | Schema |   Name   | Argument data types |  Owner   |
Language |    Source code     | Description
------------------+--------+----------+---------------------+----------+----
------+--------------------+-------------
 text             | public | gen_salt | text                | postgres | c
     | pg_gen_salt        |
 text             | public | gen_salt | text, integer       | postgres | c
     | pg_gen_salt_rounds |
(2 rows)

postgres=# grant execute on function gen_salt(text) to holly;
GRANT
postgres=# select gen_salt('md5'::text);
  gen_salt
-------------
 $1$CIvz7yzz
(1 row)




= holly@hollydb:/holly> \set VERBOSITY verbose
= holly@hollydb:/holly> select gen_salt('md5'::text);
ERROR:  42883: function gen_salt(text) does not exist
HINT:  No function matches the given name and argument types. You may need
to add explicit type casts.
LOCATION:  ParseFuncOrColumn, parse_func.c:323
= holly@hollydb:/holly> \df+ gen_salt
                                           List of functions
 Result data type | Schema | Name | Argument data types | Owner | Language |
Source code | Description
------------------+--------+------+---------------------+-------+----------+
-------------+-------------
(0 rows)

pgsql-bugs by date:

Previous
From: Joel Krajden
Date:
Subject: Re: foreign key constraint not working when index tablespace
Next
From: CaT
Date:
Subject: Re: BUG #1571: Cannot grant execute functions to non-superusers