Re: erroneous restore into pg_catalog schema - Mailing list pgsql-hackers

From Tom Lane
Subject Re: erroneous restore into pg_catalog schema
Date
Msg-id 7408.1368466857@sss.pgh.pa.us
Whole thread Raw
In response to Re: erroneous restore into pg_catalog schema  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: erroneous restore into pg_catalog schema
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, May 13, 2013 at 1:03 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> Why don't we just prohibit deletion/modification for anything below
>> FirstNormalObjectId instead of using the schema as a restriction? Then
>> we can allow creation for tables as well.

> We currently do, but that led to problems with $SUBJECT.

AFAIR there are no code restrictions based on OID value.  We've got
restrictions based on things being in pg_catalog or not, and we've got
restrictions based on things being marked pinned in pg_depend.

Looking at the OID range might be a reasonable proxy for pinned-ness,
though, and it would certainly be a lot cheaper than a lookup in
pg_depend.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: erroneous restore into pg_catalog schema
Next
From: Andres Freund
Date:
Subject: Re: erroneous restore into pg_catalog schema