Received: from hu.tm.ee (IDENT:postfix@adsl22.uninet.ee [194.204.62.22]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA74502 for ; Fri, 19 May 2000 10:59:38 -0400 (EDT) (envelope-from hannu@tm.ee) Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP id 6986E38CC; Fri, 19 May 2000 17:05:16 +0300 (EEST) Message-ID: <39254A1C.2A4D546F@tm.ee> Date: Fri, 19 May 2000 17:05:16 +0300 From: Hannu Krosing Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?= X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686) X-Accept-Language: et, en MIME-Version: 1.0 To: Hiroshi Inoue Cc: Tom Lane , Stephan Szabo , pgsql-hackers@postgresql.org Subject: Re: Re: [SQL] Foreign keys breaks tables permissions References: <25918.958691826@sss.pgh.pa.us> <001b01bfc13e$1df17600$0c64010a@kick.com> <6189.958707499@sss.pgh.pa.us> <39252551.2C3B0B17@tpf.co.jp> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/259 Hiroshi Inoue wrote: > > Tom Lane wrote: > > > "Stephan Szabo" 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