Solution for RI permission problem

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Solution for RI permission problem
Date: 2000-09-20 17:38:07
Message-ID: Pine.LNX.4.21.0009200033300.362-200000@peter
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's what I've come up with to avoid "permission denied" errors when a
RI trigger has to lock a PK table. Whenever the SELECT FOR UPDATE is
executed I temporarily switch the current user id to the owner of the PK
table. It's not the grand unified solution via setuid functions that was
envisioned now and then, but it does the same conceptually. For a
terminally elegant solution I can only suggest not using the SPI
interface.

I recommend this patch to be checked out by someone knowledgeable in the
RI area.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

Attachment Content-Type Size
ri-patch text/plain 3.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-09-20 17:38:19 Improved regression test driver
Previous Message Jerome Raupach 2000-09-20 15:37:31 error with COPY