Sergey Holod <sss(at)radiocom(dot)net(dot)ua> writes:
> GRANT USAGE ON schema data TO rcbilling;
> Don't fully undestand why I need that, but It works..
Okay, that's the same bug we found just a couple days ago. Schema-usage
errors are checked at query parse time, not execution time, and the
foreign-key triggers weren't being careful to set the right context for
those checks. There's a fix in place for 7.3.3.
regards, tom lane