Fixed generated sql for postgres substring function
Merge pull request #316 from stefk/master

Fixed generated sql for postgres substring function