Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> The attached is a patch to execute lo_unlink() before lo_create()
> in pg_restore.
Applied with corrections --- you had failed to ensure that pg_dump and
pg_restore produce the same output. I also took the opportunity to
schema-qualify the calls of lo_xxx functions, just to be on the safe
side. (The code already sets search_path, but why not be sure ...)
regards, tom lane