pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephan Szabo <sszabo@kick.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [SQL] Foreign keys breaks tables permissions
Date: Fri, 19 May 2000 17:05:16 +0300
Message-ID: <39254A1C.2A4D546F@tm.ee> (raw)
References: <m12fMDN-0003lFC@orion.SAPserv.Hamburg.dsh.de>
	<25918.958691826@sss.pgh.pa.us>
	<001b01bfc13e$1df17600$0c64010a@kick.com>
	<6189.958707499@sss.pgh.pa.us>
	<39252551.2C3B0B17@tpf.co.jp>

Hiroshi Inoue wrote:
> 
> Tom Lane wrote:
> 
> > "Stephan Szabo" <sszabo@kick.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@tpf.co.jp



view thread (13+ messages)  latest in thread

Message-ID: <39254A1C.2A4D546F@tm.ee>
Permalink:  ../39254A1C.2A4D546F@tm.ee/
Also on:    postgresql.org/message-id/39254A1C.2A4D546F@tm.ee

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: hannu@tm.ee, Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, sszabo@kick.com, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] Foreign keys breaks tables permissions
  In-Reply-To: <39254A1C.2A4D546F@tm.ee>
  References: <m12fMDN-0003lFC@orion.SAPserv.Hamburg.dsh.de> <25918.958691826@sss.pgh.pa.us> <001b01bfc13e$1df17600$0c64010a@kick.com> <6189.958707499@sss.pgh.pa.us> <39252551.2C3B0B17@tpf.co.jp> <39254A1C.2A4D546F@tm.ee>

* 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