Updated for latest SMF 2.1 Alpha release (16. Oct. 2013)
Update table queries for Postgres compatibility

Signed-off-by: portamx <support@portamx.com>