Re: [INTERFACES] A question on triggers

From: Constantin Teodorescu <teo(at)flex(dot)ro>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>, PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] A question on triggers
Date: 2000-02-17 18:04:48
Message-ID: 38AC3840.EB320B34@flex.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Mario Medina Nussbaum 2000-02-17 21:54:52 ODBC and PHP (on Linux)
Previous Message Guido Goldstein 2000-02-17 17:31:55 Re: [INTERFACES] link problems when inheriting from libpq++