It looks like in sqlalchemy >= 0.9.9 that a insert from cte doesn't get 
rendered properly.

Code:

from sqlalchemy import *

table = Table("my_table", MetaData(),
    Column("id", Integer, primary_key=True),
    Column("name", String(30)),
)

c = table.select().cte("c")
query = c.select()
insert = table.insert().from_select(table.columns, query)
print(insert)

====

In sqlalchemy 0.9.8 this produces:

INSERT INTO my_table (id, name) WITH c AS
(SELECT my_table.id AS id, my_table.name AS name
FROM my_table)
 SELECT c.id, c.name
FROM c

In sqlalchemy 1.0.4 this produces:

INSERT INTO my_table (id, name) SELECT c.id, c.name
FROM c

Run with Python 3.4.3

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to