]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- [bug] Fixed more un-intuitivenesses in CTEs
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Jul 2012 15:00:49 +0000 (11:00 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Jul 2012 15:00:49 +0000 (11:00 -0400)
commit0e41673ed4e8551b892c058ffc6a607cf7aba71c
tree6914091d7cbb58331d147242e6efa83bd1345424
parentb297b40fca923a03e3c34094e5298d6524944c39
  - [bug] Fixed more un-intuitivenesses in CTEs
    which prevented referring to a CTE in a union
    of itself without it being aliased.
    CTEs now render uniquely
    on name, rendering the outermost CTE of a given
    name only - all other references are rendered
    just as the name.   This even includes other
    CTE/SELECTs that refer to different versions
    of the same CTE object, such as a SELECT
    or a UNION ALL of that SELECT. We are
    somewhat loosening the usual link between object
    identity and lexical identity in this case.
    A true name conflict between two unrelated
    CTEs now raises an error.
CHANGES
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/expression.py
test/sql/test_cte.py