Re: [GENERAL] Disabling inheritance with query.
От | Edmundo Robles |
---|---|
Тема | Re: [GENERAL] Disabling inheritance with query. |
Дата | |
Msg-id | CAOXzpYCLCOmwp1aKzYfpGLnp6mgK=BH8CrwyjzhyYVxk59Nj1A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Disabling inheritance with query. (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [GENERAL] Disabling inheritance with query.
Re: [GENERAL] Disabling inheritance with query. |
Список | pgsql-general |
I want to do that because, I have a partitioned table (big_table) and others (t1,t2,t3,t4) have foreign keys reference to big_table and i had many trobules at insert data, reading the doc:
"A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. "
On Wed, Dec 21, 2016 at 4:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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 по дате отправления: