Re: [HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-24 Thread Tom Lane
Jim Nasby writes: > Let me ask a related question: is there any reason why we don't accept > argument names or the default specifier in the regprocedure cast? regprocedure_in does not contain a full SQL parser, which it would pretty much need in order to deal with default expressions. Argument

Re: [HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-24 Thread Jim Nasby
On 5/6/14, 1:57 PM, Peter Eisentraut wrote: On 5/5/14, 4:09 PM, Jim Nasby wrote: 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; Presum

Re: [HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-08 Thread Jim Nasby
On 5/5/14, 3:22 PM, Alvaro Herrera wrote: > Jim Nasby wrote: >> 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),

Re: [HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-06 Thread Peter Eisentraut
On 5/5/14, 4:09 PM, Jim Nasby wrote: > 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?

Re: [HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-05 Thread Alvaro Herrera
Jim Nasby wrote: > 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

[HACKERS] Issue with GRANT/COMMENT ON FUNCTION with default

2014-05-05 Thread Jim Nasby
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