Issue with GRANT/COMMENT ON FUNCTION with default - Mailing list pgsql-hackers

From Jim Nasby
Subject Issue with GRANT/COMMENT ON FUNCTION with default
Date
Msg-id 5367EFFF.8070703@nasby.net
Whole thread Raw
Responses Re: Issue with GRANT/COMMENT ON FUNCTION with default  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Issue with GRANT/COMMENT ON FUNCTION with default  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Prior to default parameters on functions, GRANT and COMMENT accepted full parameter syntax. IE:

GRANT EXECUTE ON test(t text) TO public

as opposed to regprocedure, which only accepts the data types ( test(text), not test(t text) ).

They do not accept DEFAULT though:

GRANT EXECUTE ON FUNCTION test(t text DEFAULT '') to public;
ERROR:  syntax error at or near "DEFAULT"
LINE 1: GRANT EXECUTE ON FUNCTION test(t text DEFAULT '') to public;

Presumably this is just an oversight? Related to that, is it intentional that the regprocedure cast disallows *any*
decoratorsto the function, other than type? If regprocedure at least accepted the full function parameter definition
youcould use it to get a definitive reference to a function.
 
-- 
Jim C. Nasby, Data Architect                       jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Recursive ReceiveSharedInvalidMessages not safe
Next
From: Andrew Dunstan
Date:
Subject: Re: 9.4 release notes