Gonzalo Paniagua Javier <gonzalo(at)gnome-db(dot)org> writes:
> It seems that postgres allows writing to a read-only blob opened like:
> fd = lo_open (cnc, oid, INV_READ);
AFAICS from the code, INV_READ/WRITE attached to lo_open only determine
the kind of lock taken on the LO (shared or exclusive). Not sure
whether it's a bug to prohibit the other kind of access or not.
Note that there's no "security" issue here, since anyone is allowed to
write any LO anyway.
regards, tom lane