I will push the patch manually, because the commit message doesn't follow the contribution guidelines:
* https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#com...
Regarding the reserved words, I think the right solution would be to quote the column names, as mysql module does it. New SQL spec might add other reserved words. Not using postgres myself I am not sure what is the right character to quote columns and table names, if someone writes it here and also helps to test, then I can make a patch to db_postgres module to use it.