Fix logic and add a missing function.
Merge branch 'master' of github.com:mbalmer/luapgsql