Re: [GENERAL] Indexes on inheriting tables

2011-08-29 Thread Scott Mead
2011/8/24 Ondrej Ivanič > Hi, > > On 25 August 2011 11:17, Toby Corkindale > wrote: > > Do I need to make sure I re-create every index on every child table I > > create? > > That would be.. annoying, at best. > > Yes, it is little bit annoying but I like it. You don't need any index > on parent

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Ondrej Ivanič
Hi, On 25 August 2011 11:17, Toby Corkindale wrote: > Do I need to make sure I re-create every index on every child table I > create? > That would be.. annoying, at best. Yes, it is little bit annoying but I like it. You don't need any index on parent table but you have to create them "manually"

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
On 25/08/11 12:10, Shoaib Mir wrote: On Thu, Aug 25, 2011 at 11:57 AM, Toby Corkindale mailto:toby.corkind...@strategicdata.com.au>> wrote: It seems messy to inherit the columns but not the indexes or checks upon them :( Yes it can be a bit annoying at timse but you can try to automa

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:57 AM, Toby Corkindale < toby.corkind...@strategicdata.com.au> wrote: > > It seems messy to inherit the columns but not the indexes or checks upon > them :( > > > Yes it can be a bit annoying at timse but you can try to automate the whole process as well. Like I found th

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
On 25/08/11 11:34, Shoaib Mir wrote: On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale mailto:toby.corkind...@strategicdata.com.au>> wrote: Do I need to make sure I re-create every index on every child table I create? That would be.. annoying, at best. Is there a way to enable

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale < toby.corkind...@strategicdata.com.au> wrote: > > Do I need to make sure I re-create every index on every child table I > create? > That would be.. annoying, at best. > > Is there a way to enable inheritance of indexes too? > > You do not need an

[GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
Hi, I'm using Pg 9.0 and inheritance to do table partitioning. A simple example would be: CREATE TABLE foo ( id INTEGER PRIMARY KEY, thing VARCHAR(32) ); CREATE INDEX foo_thing_idx ON foo(thing); CREATE TABLE foo_1 () INHERITS (foo); I read that foreign key constraints wouldn't be inherited