Gaetano Mendola <mendola@bigfoot.com> writes:
> I'm observing that is not allowed to LOCK a table in a
> STABLE/IMMUTABLE function but at same time is allowed
> a SELECT FOR UPDATE.
Really? AFAICS, CommandIsReadOnly() will reject SELECT FOR UPDATE too.
regards, tom lane