Control: tags -1 moreinfo

Re: Bzzzz 2014-11-17 <[email protected]>
> There are 2 Fn that pose a problem in this extension:
>    uuid_generate_v3(namespace uuid, name text)
>    uuid_generate_v5(namespace uuid, name text)
> because pg_get_function_identity_arguments(func_oid)
> and pg_get_function_arguments(func_oid) always return:
> "namespace uuid, name text" as parameters instead of
> "uuid, text".
> 
> This prevents to reconstitute these Fn full names in
> an external python program (in order to grant or revoke
> user rights.)

Hi,

I don't think that's a bug. While it's uncommon for builtin functions
to have named arguments, there's a few others in pg_catalog.

Also, GRANT/REVOKE works with named parameters as well:

CREATE FUNCTION exec(text) RETURNS text LANGUAGE plpgsql VOLATILE AS
$f$BEGIN EXECUTE $1; RETURN $1; END;$f$;

select exec(format('grant all on function %I(%s) to public', proname, 
pg_get_function_arguments(oid))) from pg_proc where proname ~ 'uuid';
                                    exec                                     
-----------------------------------------------------------------------------
[...]
 grant all on function uuid_generate_v3(namespace uuid, name text) to public
 grant all on function uuid_generate_v4() to public
 grant all on function uuid_generate_v5(namespace uuid, name text) to public
(22 Zeilen)

What issue specifically do you have with this?

Christoph
-- 
[email protected] | http://www.df7cb.de/

_______________________________________________
Pkg-postgresql-public mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public

Reply via email to