Logged In: YES
user_id=698599
Originator: NO

Some random thoughts from a passer-by: if I had to guess, I would say this is a bug in the handling of the PG_OID type in pgresult.c - strtol(3) returns LONG_MIN on under or overflow. The logic in libPQgetvalue for the PG_OID case is too subtle to for me to immediately see what the problem is - I'm not sure what the oidCache is being used for.