From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luis Sousa <llsousa@ualg.pt>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Permission on insert rules
Date: Wed, 13 Nov 2002 09:27:01 -0500
Message-ID: <21306.1037197621@sss.pgh.pa.us> (raw)
In-Reply-To: <3DD22D03.4090505@ualg.pt>
References: <web-1822655@davinci.ethosmedia.com>
<1037137215.27220.64.camel@camel>
<3DD22D03.4090505@ualg.pt>
Luis Sousa <llsousa@ualg.pt> writes:
> When inserting, using the rule, the insert that's defined on the rule
> works fine, but the insert defined inside the function, doesn't (that's
> the one that gives permssion denied).
Right. As of 7.3 you can fix this by making the function "setuid" (ie,
it runs with the permissions of the function owner, not the caller).
A rule's permission effects only extend as far as access rights to the
tables explicitly named in the rule. Evaluation of functions appearing
in the text of the rule is done normally --- ie, as the calling user
(unless you use the new setuid-function feature). There's been past
discussion about whether that's a good idea, but it would be quite
difficult to change it.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, llsousa@ualg.pt, xzilla@users.sourceforge.net, josh@agliodbs.com
Subject: Re: Permission on insert rules
In-Reply-To: <21306.1037197621@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox