From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Stephan Szabo" <sszabo(at)kick(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [SQL] Foreign keys breaks tables permissions |
Date: | 2000-05-19 03:38:19 |
Message-ID: | 6189.958707499@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers pgsql-sql |
"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.
Hmm, good point. And I think I see the reason for the protection
logic as well: if you can do SELECT FOR UPDATE then you can acquire
a lock that will block a competing writer. Therefore, even though
you can't modify the table, you can create the same sort of denial-
of-service attack that someone with real UPDATE privileges could
create, just by leaving your transaction open.
So, either we live with update requiring update rights on the
table referenced as a foreign key, or we break something else.
Grumble.
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?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-05-19 11:28:17 | Re: Re: [SQL] Foreign keys breaks tables permissions |
Previous Message | Stephan Szabo | 2000-05-19 02:58:32 | Re: [SQL] Foreign keys breaks tables permissions |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-05-19 03:43:02 | Re: OO Patch |
Previous Message | Tom Lane | 2000-05-19 03:31:34 | Re: Actually it's a bufmgr issue (was Re: Another pg_listener issue) |
From | Date | Subject | |
---|---|---|---|
Next Message | Rudolph, Michael | 2000-05-19 08:34:02 | AW: What is the difference between NULL and "undef" |
Previous Message | Stephan Szabo | 2000-05-19 02:58:32 | Re: [SQL] Foreign keys breaks tables permissions |