I now that varchar returns a string. What I'm saying is that it is incorrect on the database. It should be int, not varchar.

In any case your code is not consistent, in `add_pmids` you are requesting for a list of ints... Fix this.