From: | Robins Tharakan <tharakan(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: CREATE OPERATOR query |
Date: | 2013-05-22 02:03:57 |
Message-ID: | CAEP4nAwoP4hC28gB1hSHhK_O9bfFgoPW0C0BpqYD5oUSuZ12tg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Yes, but the documentation states that EXECUTE permission for the function
is required to even CREATE the operator.
This what the doc says:
> To be able to create an operator, you must have USAGE privilege on the
argument types and the return type, as well as EXECUTE privilege on the
underlying function. If a commutator or negator operator is specified, you
must own these operators.
Am I missing something obvious here?
--
Robins Tharakan
On 22 May 2013 07:12, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> Robins Tharakan escribió:
> > Further, I seem to have a similar problem with the EXECUTE check
> > requirement as well.
> > Sample SQL given below.
> >
> > BEGIN TRANSACTION;
> > CREATE ROLE rol_op3;
> > CREATE TYPE type_op3 AS ENUM ('new', 'open', 'closed');
> > CREATE FUNCTION fn_op3(type_op3, type_op3)
> > RETURNS type_op3 AS $$
> > SELECT NULL::type_op3;
> > $$ LANGUAGE sql IMMUTABLE;
> > REVOKE EXECUTE ON FUNCTION fn_op3(type_op3, type_op3) FROM rol_op3;
>
> Doesn't PUBLIC still have EXECUTE permissions on this function?
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-05-22 03:33:50 | Re: CREATE OPERATOR query |
Previous Message | Alvaro Herrera | 2013-05-22 01:42:49 | Re: CREATE OPERATOR query |