Re: domain access privilege - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: domain access privilege
Date
Msg-id 20020720183410.GA440@wolff.to
Whole thread Raw
In response to Re: domain access privilege  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: domain access privilege
List pgsql-general
On Sat, Jul 20, 2002 at 14:06:30 -0400,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
>
> > There can be a similar problem if you temporarily grant someone references
> > to a table to do something and they either create other references you
> > don't want or they refuse to drop the reference later to allow you to
> > drop the table.
>
> You can drop the table whether they want you to or not; the foreign key
> constraint goes away by CASCADE.

I tried this as the user owning the referenced table (using 7.2.1) and
I was unable to do the drop. When I did it as a superuser the referencing
constraint was dropped and then the table.

The message was:
NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table "test1"
ERROR:  test1: Must be table owner.

Normally you aren't going to give someone references access unless you trust
them, so it isn't a big deal if you need to cooperate with them to drop
a table they are referencing.

I guess using a restricted schema is reasonable for domains you don't want
everyone to use. I can't think of a reason you would want people to see it,
but not be able to use it.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: domain access privilege
Next
From: "Stephen Birch"
Date:
Subject: Re: timestamped archive data index searches