pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrzej Mazurkiewicz <andrzej@mazurkiewicz.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Inheritance of foregn key constraints.
Date: Sat, 22 Mar 2014 11:13:56 -0400
Message-ID: <18757.1395501236@sss.pgh.pa.us> (raw)
In-Reply-To: <1547752.joDV9Ig9SK@tata>
References: <1523734.6NloWteI3S@tata>
	<15558.1395411243@sss.pgh.pa.us>
	<1547752.joDV9Ig9SK@tata>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andrzej Mazurkiewicz <andrzej@mazurkiewicz.org> writes:
>> So in other words, somebody could (accidentally or maliciously) break the
>> constraint by dropping one of its implementation triggers.  I doubt that's
>> acceptable.

> The present postgres behavior ALLOWS accidental or malicious break the 
> constraint by dropping one of its implementation triggers. Please ref. to the 
> following example.
> The following script has been run by the postgres user.

Well, right there you lost me, because superusers are exempt from all
permissions checks by definition; and in particular, direct manipulations
of the system catalogs by superusers are always out of scope for
discussions of what the system should try to protect itself against.
(Try "delete from pg_proc;" in a scratch database sometime.)

My point is that without the internal dependency, a normal user could do
standard SQL commands (ie DROP TRIGGER) and break the FK that way.
That's the case that's not acceptable.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (8+ messages)  latest in thread

Message-ID: <18757.1395501236@sss.pgh.pa.us>
Permalink:  ../18757.1395501236@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18757.1395501236@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrzej@mazurkiewicz.org
  Subject: Re: Inheritance of foregn key constraints.
  In-Reply-To: <18757.1395501236@sss.pgh.pa.us>

* 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