I think the problem is with the foreign-key reference. Does the calling user have permission to do SELECT FOR UPDATE on the referenced table? regards, tom lane
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных