Chris Travers <chris(at)travelamericas(dot)com> writes:
> Is there any way to try to enforce a rewrite
> rule in such a away as to do the select query as normal, but if
> necessary raise an exception (to abort the select)?
No.
You need to rethink your permissions design. One idea that you *can*
make work is to have a view that everyone can read, but are only able to
see selected rows in. pg_stats works that way, and I think there are
examples in the information schema as well.
regards, tom lane