Re: kind of RULE on SELECT depending on existence of a WHERE condition - Mailing list pgsql-sql

From Richard Huxton
Subject Re: kind of RULE on SELECT depending on existence of a WHERE condition
Date
Msg-id 4B8B983B.4080205@archonet.com
Whole thread Raw
In response to kind of RULE on SELECT depending on existence of a WHERE condition  (rawi <only4com@web.de>)
Responses Re: kind of RULE on SELECT depending on existence of a WHERE condition  (rawi <only4com@web.de>)
List pgsql-sql
On 01/03/10 10:07, rawi wrote:
> But - for the case, that an application-programmer or even I (tired, middle
> in the night) forget to program the insertion of the needed limiting WHERE
> condition - it would be great to have some sort of rule ON SELECT, so a
> SELECT without WHERE on the flags would return NOTHING.
>
> Is there a way to achieve this?

Not quite the way you suggest. You could build a series of views with 
the WHERE conditions built in to them, and grant permissions on those 
though.

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: rawi
Date:
Subject: kind of RULE on SELECT depending on existence of a WHERE condition
Next
From: rawi
Date:
Subject: Re: kind of RULE on SELECT depending on existence of a WHERE condition