Gavin Sherry <swm@linuxworld.com.au> writes:
> If lo_initialize returns < 0, you have some pretty serious problems - out
> of memory, conn is invalid, etc. However, casting -1 to Oid returns what
> seems to be a valid Oid. Shouldn't it return InvalidOid?
Yes, evidently so. Good catch!
regards, tom lane