Re: [sqlalchemy] PostgreSQL table inheritance with "postgresql_inherits" does not take "add_is_dependent_on" into account

2015-11-23 Thread Adrian Schreyer
I actually I just found the problem; the tables are in fact created in the right order - the problem is that the DDL contains INHERITS ( "parent" ). It gives the same error if I try to run the code in a GUI with the inherited table name quoted, without (the quoting) though it works. On Mon, Nov

Re: [sqlalchemy] PostgreSQL table inheritance with "postgresql_inherits" does not take "add_is_dependent_on" into account

2015-11-23 Thread Adrian Schreyer
That's true now that you are saying it, I actually implemented it myself before using a simple @compiles with CreateTable. On Mon, Nov 23, 2015 at 9:33 PM Mike Bayer wrote: > > > On 11/23/2015 03:15 PM, Adrian wrote: > > I attached a script that reproduces the problem.

Re: [sqlalchemy] PostgreSQL table inheritance with "postgresql_inherits" does not take "add_is_dependent_on" into account

2015-11-23 Thread Adrian Schreyer
That works and solves it, thanks! On Mon, Nov 23, 2015 at 9:37 PM Mike Bayer wrote: > > > On 11/23/2015 03:15 PM, Adrian wrote: > > I attached a script that reproduces the problem. It actually only > > happens if the metadata contains a schema, then the tablename in

Re: [sqlalchemy] ORM relationships and (PostgreSQL) partition constraint-exclusion

2013-12-05 Thread Adrian Schreyer
Never mind, the problem was that I specified the clause in a secondaryjoin and not in the primaryjoin of the relationship(). On Thu, Dec 5, 2013 at 10:44 AM, Adrian adrian.schre...@gmail.com wrote: Hi All, I have a few partitioned tables in my PostgreSQL database but I do not know yet how

Re: [sqlalchemy] ORM relationships and (PostgreSQL) partition constraint-exclusion

2013-12-05 Thread Adrian Schreyer
or if this kind of mapping is simply not supported. On Thu, Dec 5, 2013 at 3:31 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Dec 5, 2013, at 6:57 AM, Adrian Schreyer adrian.schre...@gmail.com wrote: Actually that was a bit too early but I tracked the problem down to the many-to-many

Re: [sqlalchemy] ORM relationships and (PostgreSQL) partition constraint-exclusion

2013-12-05 Thread Adrian Schreyer
=[j.c.partitioned_id, j.c.second_other_id]) or you can just ignore those extra attributes on some of your Partitioned objects. On Dec 5, 2013, at 11:03 AM, Adrian Schreyer adrian.schre...@gmail.com wrote: Given the three mappings *First*, *Second* and *Partitioned*, I want to declare

Re: [sqlalchemy] ORM relationships and (PostgreSQL) partition constraint-exclusion

2013-12-05 Thread Adrian Schreyer
in the example I gave. On Dec 5, 2013, at 1:55 PM, Adrian Schreyer adrian.schre...@gmail.com wrote: The partitioned relationship actually referred to the tertiary table in both the primary and secondary join - the problem for me was that in the primaryjoin primaryjoin=and_(First.first_id