]> 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:10:42 +0000 (11:10 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Jul 2012 15:10:42 +0000 (11:10 -0400)
commit878af426f7eb19c257f1db83f5b1af34624c2c6a
treef963fbfd6efd9c31cbbebcdfb950a0c7ac41f1b8
parent1937bb976c60cde9ed930d7d70e77cdec25403bf
  - [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