Re: Disabling inheritance with query.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Edmundo Robles <edmundo(at)sw-argos(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Disabling inheritance with query.
Date: 2016-12-21 22:58:45
Message-ID: 15399.1482361125@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Edmundo Robles <edmundo(at)sw-argos(dot)com> writes:
> i need disable inheritance from many tables in a query like
> "delete from pg_inherits where inhparent=20473" instead alter table ...
> but is safe? which is the risk for database if i delete it?

This seems really dangerous. You're certainly missing the pg_depend
linkages, not to mention attribute inheritance counts in pg_attribute,
and there may be other things I'm not remembering offhand.

Why can't you use the normal ALTER TABLE approach?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-12-21 23:09:15 Re: pg_restore to a port where nobody is listening?
Previous Message Edmundo Robles 2016-12-21 22:36:03 Disabling inheritance with query.