Having issues with pull algorithm

Depends on a several sql queries, at least one which accesses system
tables (requires permissions)
May need to check syntax on those queries
When dynamically matching keys to a value, we don't know if value is an
int or string. Could prove troublesome.