Re: [GENERAL] Disabling inheritance with query.

2016-12-22 Thread Edmundo Robles
Sorry the full message is this I want to do that because, I have a partitioned table (big_table like master and child like ...t201610,t201611,t201612...) 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 seriou

Re: [GENERAL] Disabling inheritance with query.

2016-12-22 Thread Scott Mead
On Thu, Dec 22, 2016 at 9:51 AM, Edmundo Robles wrote: > 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 inheri

Re: [GENERAL] Disabling inheritance with query.

2016-12-22 Thread Edmundo Robles
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

Re: [GENERAL] Disabling inheritance with query.

2016-12-22 Thread Jaime Soler
You should use alter table XX NO INHERIT parent_table; 2016-12-22 9:49 GMT+01:00 Francisco Olarte : > Edmundo: > > On Wed, Dec 21, 2016 at 11:36 PM, Edmundo Robles > wrote: > > i need disable inheritance from many tables in a query like > > "delete from pg_inherits where inhparent=20473" in

Re: [GENERAL] Disabling inheritance with query.

2016-12-22 Thread Francisco Olarte
Edmundo: On Wed, Dec 21, 2016 at 11:36 PM, Edmundo Robles wrote: > 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? Dangers of touching the

Re: [GENERAL] Disabling inheritance with query.

2016-12-21 Thread Scott Marlowe
On Wed, Dec 21, 2016 at 3:36 PM, Edmundo Robles wrote: > Hi! > > 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? You could change the s

Re: [GENERAL] Disabling inheritance with query.

2016-12-21 Thread Tom Lane
Edmundo Robles 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_depe

[GENERAL] Disabling inheritance with query.

2016-12-21 Thread Edmundo Robles
Hi! 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?