add lists to and return lists from a PostGreSQL database