Re: lo_import() of an empty file

2018-03-30 Thread Bruce Momjian
On Fri, Mar 30, 2018 at 02:22:49PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I have just discovered if you try to lo_import() an empty file, and oid > > is returned, but nothing is added to pg_largeobject: > > Why would you expect there to be? There's no data to store. > > There should

Re: lo_import() of an empty file

2018-03-30 Thread Tom Lane
Bruce Momjian writes: > I have just discovered if you try to lo_import() an empty file, and oid > is returned, but nothing is added to pg_largeobject: Why would you expect there to be? There's no data to store. There should be an entry in pg_largeobject_metadata, though.

lo_import() of an empty file

2018-03-30 Thread Bruce Momjian
I have just discovered if you try to lo_import() an empty file, and oid is returned, but nothing is added to pg_largeobject: $ > /rtmp/a $ psql test SELECT lo_import('/rtmp/a'); lo_import --- 16385 SELECT * from pg_lar