Update templates
Merge remote-tracking branch 'origin/master' into db_refactor
Handle comment append from php. Improve plpgsql flood control