Re: [GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread David Johnston
> > create table invoice_attachment ( > check (file_class = 1), > foreign key(ref_key) references invoice(id), > ) inherits (file_attachment); > > create table order_attachment ( > check(file_class = 2), > foreign key (ref_key) references order(id), > ) inherits (file_attachment); > > While I

Re: [GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread Chris Travers
Ok So what I am trying to do is: 1) Paritioned tables 2) Joins against the table partitions The way I have this done is: The first table is partitioned on the basis of one part of the primary key. So in theory since nobody has permission to insert into the base table, all records should have

Re: [GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread David Johnston
On Jul 9, 2011, at 9:21, Chris Travers wrote: > On Sat, Jul 9, 2011 at 6:09 AM, Guillaume Lelarge > wrote: > >> >> To have a primary key or a unique key on an partitioned table, it would >> mean that we should be able to have one index on multiple tables. >> Because primary key and unique cons

Re: [GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread Chris Travers
On Sat, Jul 9, 2011 at 6:09 AM, Guillaume Lelarge wrote: > > To have a primary key or a unique key on an partitioned table, it would > mean that we should be able to have one index on multiple tables. > Because primary key and unique constraints are enforced with an index. > That's not something

Re: [GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread Guillaume Lelarge
On Sat, 2011-07-09 at 05:59 -0700, Chris Travers wrote: > Hi all; > > I started trying to use table partitioning to handle a rather odd case > in the software I am working on. I ran into an issue (one I can > correct in my code) that strikes me as extremely unintuitive. I > figured I would repor

[GENERAL] Unintuitive behavior regarding inheritance

2011-07-09 Thread Chris Travers
Hi all; I started trying to use table partitioning to handle a rather odd case in the software I am working on. I ran into an issue (one I can correct in my code) that strikes me as extremely unintuitive. I figured I would report it here as behavior I would like to see change. The basic problem