summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-03-09 19:17:45 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-03-09 19:17:45 -0500
commite7be5a5729cabc6133b4fc83c06f6c5277a7af19 (patch)
treeacca1e4ff7c5683cbd4ae615bd05fc90062c5b2f /test/dialect/test_postgresql.py
parenta1288bf78f887aeef890e4e6cc0f769f4d6a81f5 (diff)
downloadsqlalchemy-e7be5a5729cabc6133b4fc83c06f6c5277a7af19.tar.gz
- Changed the underlying approach to query.count().
query.count() is now in all cases exactly: query. from_self(func.count(literal_column('1'))). scalar() That is, "select count(1) from (<full query>)". This produces a subquery in all cases, but vastly simplifies all the guessing count() tried to do previously, which would still fail in many scenarios particularly when joined table inheritance and other joins were involved. If the subquery produced for an otherwise very simple count is really an issue, use query(func.count()) as an optimization. [ticket:2093]
Diffstat (limited to 'test/dialect/test_postgresql.py')
0 files changed, 0 insertions, 0 deletions