From: | "CaT" <cat(at)zip(dot)com(dot)au> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1571: Cannot grant execute functions to non-superusers |
Date: | 2005-03-31 00:07:56 |
Message-ID: | 20050331000756.CE4F7F0E4D@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1571
Logged by: CaT
Email address: cat(at)zip(dot)com(dot)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(at)hollydb:/holly> \set VERBOSITY verbose
= holly(at)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(at)hollydb:/holly> \df+ gen_salt
List of functions
Result data type | Schema | Name | Argument data types | Owner | Language |
Source code | Description
------------------+--------+------+---------------------+-------+----------+
-------------+-------------
(0 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | CaT | 2005-03-31 00:39:55 | Re: BUG #1571: Cannot grant execute functions to non-superusers |
Previous Message | Joel Krajden | 2005-03-30 20:11:53 | Re: foreign key constraint not working when index tablespace |