web2py/web2py — pull request #521 by janknaupato (2014-10-16 12:04:11+00:00)
Title: Fix for issue 1932: Aggregrate function won't show up in SQLTABLE

Addresses issue https://code.google.com/p/web2py/issues/detail?id=1932

in SQLTABLE, reverted or fixed use of REGEX_TABLE_DOT_FIELD leading to ignoring calculated / aggregate columns

Use of REGEX_TABLE_DOT_FIELD.match() leads to failure to detect aggregate function columns, at least when using postgresql backend. Replace where completely unnecessary, catch otherwise, making sure to retain copy/reference behavior.