From: Constantin Teodorescu <teo@flex.ro>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ed Loehr <eloehr@austin.rr.com>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: [INTERFACES] A question on triggers
Date: Thu, 17 Feb 2000 20:04:48 +0200
Message-ID: <38AC3840.EB320B34@flex.ro> (raw)
References: <38AAAD16.C05F47C3@flex.ro>
<38AACF15.E7148A20@austin.rr.com>
<38AAEB22.19CF1C6B@flex.ro>
<4624.950739193@sss.pgh.pa.us>
Tom Lane wrote:
>
> >>>> Is there any chance to restrict the direct updates of any user to the
> >>>> "stock" table?
> >>>> So that the information in the "stock" table should be updated ONLY by
> >>>> those triggers?
>
> > But wouldn't be nice if PostgreSQL could offer a more elegant solution?
>
> Can't you do it with the normal GRANT/REVOKE access-control mechanism?
No. It didn't worked, that was my first idea!
> I'm pretty sure that for rules (views), the access rights for queries
> issued within the rule are checked based on the owner of the rule, not
> the user who invoked the rule. Triggers ought to work the same way,
> though I haven't tried it. So you could make the trigger function and
> the protected table owned by the same user, and then not grant write
> permission on that table to anyone else.
It seems it didn't work!
Constantin Teodorescu
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-interfaces@postgresql.org
Cc: teo@flex.ro, tgl@sss.pgh.pa.us, eloehr@austin.rr.com
Subject: Re: [INTERFACES] A question on triggers
In-Reply-To: <38AC3840.EB320B34@flex.ro>
* 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