Re: Re: [SQL] Foreign keys breaks tables permissions

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephan Szabo <sszabo(at)kick(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [SQL] Foreign keys breaks tables permissions
Date: 2000-05-19 14:05:16
Message-ID: 39254A1C.2A4D546F@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-sql

Hiroshi Inoue wrote:
>
> Tom Lane wrote:
>
> > "Stephan Szabo" <sszabo(at)kick(dot)com> writes:
> > > I believe the reason that the trigger does a select for update was
> > > because otherwise there could exist a case that we select and see it
> > > and then have the row go away afterwards because nothing stops the
> > > delete.
> >
> > Probably the denial-of-service argument is the weakest of the three
> > points. Is anyone in favor of reducing SELECT FOR UPDATE to only
> > requiring "SELECT" rights, and living with the possible lock-that-
> > you-shouldn't-really-have-been-able-to-get issue?
> >
>
> But what about DELETE CASCADE cases for exmaple ?
> Maybe RI_trigger should be able to update/insert/delete
> the referenced table.
> However another kind of permission for foreign key
> seems to be needed. i.e only granted users could
> define foreign key of the referenced table in CREATE
> (ALTER) TABLE command.

IIRC this is even in the SQL standard as a separate right (maybe REFERENCES ?)

> Otherwise not granted
> users could delete tuples of the referenced table
> by defining a bogus foreign key of the table with
> DELETE CASCADE option.
>
> Comments ?
>
> Regards.
>
> Hiroshi Inoue
> Inoue(at)tpf(dot)co(dot)jp

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hannu Krosing 2000-05-19 15:15:53 Re: Re: [SQL] Foreign keys breaks tables permissions
Previous Message Hiroshi Inoue 2000-05-19 11:28:17 Re: Re: [SQL] Foreign keys breaks tables permissions

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-19 14:10:46 Re: Re: Heaps of read() syscalls by the postmaster
Previous Message Matthias Urlichs 2000-05-19 14:00:14 Re: Performance (was: The New Slashdot Setup (includes MySql server))

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Wood 2000-05-19 14:28:02 Creating Tables in Functions
Previous Message Thomas Lockhart 2000-05-19 13:43:45 Re: Question about databases in alternate locations...