Re: CREATE RULE problem/question requesting workaround - Mailing list pgsql-general

From Tom Lane
Subject Re: CREATE RULE problem/question requesting workaround
Date
Msg-id 22353.1070815585@sss.pgh.pa.us
Whole thread Raw
In response to CREATE RULE problem/question requesting workaround  (Chris Travers <chris@travelamericas.com>)
Responses Re: CREATE RULE problem/question requesting workaround  (Chris Travers <chris@travelamericas.com>)
List pgsql-general
Chris Travers <chris@travelamericas.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

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: user defined variable per session
Next
From: Chris Travers
Date:
Subject: Re: CREATE RULE problem/question requesting workaround