ENH: Support PostgreSQL in filter data functions

Tested-by: Nils Gladitz <nilsgladitz@gmail.com>
BUG: Fix incorrect queries in filters.

This commit fixes the following error:

   Unknown column 'u.updateid' in 'where clause'