pq: invalid input syntax for type integer: "reslib"