[sqlalchemy] Postgres INHERITS and concrete table inheritance

2009-12-15 Thread Martin Aspeli
Hi, I'm a little unclear about the relationship between SQLAlchemy inheritance (in particular with the declarative extension) and the INHERITS keyword in Postgres. In Postgres, we have this (simplified for the purposes of his mail): CREATE TABLE owner ( id integer NOT NULL, name

Re: [sqlalchemy] Postgres INHERITS and concrete table inheritance

2009-12-15 Thread Michael Bayer
Martin Aspeli wrote: Hi, This kind of works, but there are a few problems: - The 'owners' variable on the Game type only contains Vehicle objects. I'd like it to contain the correct sub-class if possible. When a row is received SQLAlchemy would need to know what type that row is, in order

Re: [sqlalchemy] Postgres INHERITS and concrete table inheritance

2009-12-15 Thread Alex Brasetvik
On Dec 15, 2009, at 17:59 , Michael Bayer wrote: My understanding is that INHERITS is usually used in practice to provide transparent sharding of table data and not necessarily to express class hierarchies, but this is strictly anecdotal knowledge. Agreed. The PostgreSQL documentation[1]