allow create function, vacuum and other sql queries

a fix over the previous pull request