AZ628: A condition calls the app's code where its text doesn't show it
A condition reads with the policy's rights wherever it is checked. Where the app role checks one itself (a rule, a view its rules read, a masked view), rowstile runs a call of the app's code through a function that runs as the policy's owner, and it finds the call in the condition's text: a name followed by a parenthesis, or an operator that isn't one of Postgres's own. Postgres also calls a function written as a column of its row ({this.blocked} for blocked(docs), a computed column), through a cast to a type of the app's, or as OPERATOR(app.=), and none of those shows in the text: the function would run with the app role's rights, and read of a table with rules only what the signed-in user may see there. Applying asks Postgres what the rules and their views call, and refuses such a function, naming it and the rule it is reached from. Call it by its name, with parentheses, on the row's columns, as {app.blocked_doc(this.id)}. A function that is IMMUTABLE reads nothing, whoever runs it, and is left alone, as a C function is.
Reported when the policy is applied (rowstile push, apply, a migration), against the database.