Re: 64-bit API for large objects - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 64-bit API for large objects
Date
Msg-id 23730.1127596787@sss.pgh.pa.us
Whole thread Raw
In response to Re: 64-bit API for large objects  (Jeremy Drake <pgsql@jdrake.com>)
List pgsql-hackers
Jeremy Drake <pgsql@jdrake.com> writes:
>> 0) In "Oid lo_creat(PGconn *conn, int mode)," why is there a mode on
>> lo_create? The mode is determined when the object is lo_open()ed, right?

> I think the docs basically said it is a vestigial feature, it used to be
> useful but the code evolved in such a way that it ceased being useful.  It
> is probably still there to allow old code to continue to compile against
> newer servers without being recompiled.

Yeah.  There were once multiple types of large objects, and I suppose
the mode argument told lo_creat which kind to create.  I have no idea
how the read/write bits got included into that --- it doesn't make any
sense.  As of PG 8.1, lo_creat just ignores the mode argument.  We can't
delete the argument though without causing a lot of compatibility
headaches.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: gcc4's uninitialized-variable warnings
Next
From: Martijn van Oosterhout
Date:
Subject: \x output blowing up