Thread: Bug related with permissions - VIEWS and RULES

Bug related with permissions - VIEWS and RULES

From
Luis Sousa
Date:
Hi all,

Can anyone tell me if the bug reported on
http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg07755.html is
already fixed?
I'm using PostgreSQL 7.3.3 on i386-pc-linux-gnu, compiled by GCC gcc
(GCC) 3.3 (Debian), and I have the same problem described for 7.3.4 and
7.4.1.
This bug can be reproduced creating a table, creating a view over the
table and an insert rule over the view. The rule must be in the format:
CREATE RULE "test_rule" AS ON INSERT TO "test"
    DO INSTEAD(
    INSERT INTO "test" (fld) VALUES (NEW.fld);
    );
If calling a function inside the rule's definition, the permission were
read OK.
SELECT my_func (NEW.fld) AS OK;

Best regards,
Luis Sousa

Re: Bug related with permissions - VIEWS and RULES

From
Alvaro Herrera
Date:
On Tue, Jul 06, 2004 at 09:33:17AM +0100, Luis Sousa wrote:

> Can anyone tell me if the bug reported on
> http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg07755.html is
> already fixed?
> I'm using PostgreSQL 7.3.3 on i386-pc-linux-gnu, compiled by GCC gcc
> (GCC) 3.3 (Debian), and I have the same problem described for 7.3.4 and
> 7.4.1.

7.3.6 is the latest for the 7.3 series and I believe that bug was fixed.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")

Re: Bug related with permissions - VIEWS and RULES

From
Tom Lane
Date:
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> On Tue, Jul 06, 2004 at 09:33:17AM +0100, Luis Sousa wrote:
>> Can anyone tell me if the bug reported on
>> http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg07755.html is
>> already fixed?

> 7.3.6 is the latest for the 7.3 series and I believe that bug was fixed.

As per the followup discussion to that message: the "real" fix requires
a datastructure change and therefore is only present in 7.5devel.  7.3.6
and 7.4.3 simply revert the behavior to what it was in 7.3.2 and
earlier.

            regards, tom lane

Re: Bug related with permissions - VIEWS and RULES

From
Luis Sousa
Date:
Tom Lane wrote:

>Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
>
>
>>On Tue, Jul 06, 2004 at 09:33:17AM +0100, Luis Sousa wrote:
>>
>>
>>>Can anyone tell me if the bug reported on
>>>http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg07755.html is
>>>already fixed?
>>>
>>>
>
>
>
>>7.3.6 is the latest for the 7.3 series and I believe that bug was fixed.
>>
>>
>
>As per the followup discussion to that message: the "real" fix requires
>a datastructure change and therefore is only present in 7.5devel.  7.3.6
>and 7.4.3 simply revert the behavior to what it was in 7.3.2 and
>earlier.
>
>            regards, tom lane
>
>
>
>
And what was the behavior in 7.3.2 and ealier?

Regards
Luis Sousa