Re: [GENERAL] Disabling inheritance with query. - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Disabling inheritance with query.
Date
Msg-id 15399.1482361125@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Disabling inheritance with query.  (Edmundo Robles <edmundo@sw-argos.com>)
Responses Re: [GENERAL] Disabling inheritance with query.
List pgsql-general
Edmundo Robles <edmundo@sw-argos.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


pgsql-general by date:

Previous
From: Edmundo Robles
Date:
Subject: [GENERAL] Disabling inheritance with query.
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] pg_restore to a port where nobody is listening?