Expand description
v7.39 (round 342+, V40) — the two large-object calls that touch a SERVER FILE.
lo_import('/path') and lo_export(oid, '/path') are the only members
of the lo_* family that do file IO, and the engine is no_std — it has
no filesystem. The rest of the family (round 306’s descriptor table,
lo_get / lo_put / lo_from_bytea / lo_unlink) works entirely in
the catalog and needs nothing from the host.
So these two follow the contract COPY … FROM '<file>' already uses
(round 249): the shape and every message live here, in the engine, and
each host — the server and the embedded API — supplies only the
std::fs call. That keeps the two hosts saying the same thing.
PG 18.4, measured:
lo_importanswers the new oid in a column namedlo_import;lo_exportanswers1in a column namedlo_export.- a missing input file is
could not open server file "/x": No such file or directory; - an unwritable target is
could not create server file "/x": No such file or directory; - both are superuser-only:
permission denied for function lo_import.
Enums§
- LoFile
Call - A
SELECT lo_import(…)/SELECT lo_export(…)the host must run, because it reads or writes a file.
Functions§
- could_
not_ create - PG’s wording for a file it could not write.
- could_
not_ open - PG’s wording for a file it could not read.
- parse_
lo_ file_ call - Recognise a bare
SELECT lo_import(…)/SELECT lo_export(…). - permission_
denied - PG’s wording when the caller is not a superuser.