On 6/29/18 13:07, amul sul wrote: > This happens because of in fmgr_security_definer() function we are > changing global variable SecurityRestrictionContext and in the > StartTransaction() insisting it should be zero, which is the problem.
Hmm, what is the reason for this insistation? We could work around this for now by prohibiting transaction commands in security definer procedures, similar to what we do in procedures with GUC settings attached. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services