referential integrity problem

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: referential integrity problem
Date: 2002-04-25 02:07:27
Message-ID: 20020425110727P.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It seems we can create a forein key using REFERENCES privilege but
cannot drop the table if its owner is not same as the referenced
table. Is this a feature or bug?

-- create a table as user foo
\c - foo
create table t1(i int primary key);
-- grant reference privilege to user bar
grant references on t1 to bar;
-- create a table as user bar
\c - bar
create table t2(i int references t1);
-- cannot drop t2 as user bar?
drop table t2;
NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "t1"
ERROR: t1: Must be table owner.
--
Tatsuo Ishii

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2002-04-25 02:08:51 Re: Vote totals for SET in aborted transaction
Previous Message Michael Loftis 2002-04-25 02:06:12 Re: Vote on SET in aborted transaction