The following bug has been logged online: Bug reference: 1571 Logged by: CaT Email address: [EMAIL PROTECTED] 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) = [EMAIL PROTECTED]:/holly> \set VERBOSITY verbose = [EMAIL PROTECTED]:/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 = [EMAIL PROTECTED]:/holly> \df+ gen_salt List of functions Result data type | Schema | Name | Argument data types | Owner | Language | Source code | Description ------------------+--------+------+---------------------+-------+----------+ -------------+------------- (0 rows) ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match