Re: kind of RULE on SELECT depending on existence of a WHERE condition

From: Richard Huxton <dev(at)archonet(dot)com>
To: rawi <only4com(at)web(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: kind of RULE on SELECT depending on existence of a WHERE condition
Date: 2010-03-01 10:34:35
Message-ID: 4B8B983B.4080205@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message rawi 2010-03-01 12:16:32 Re: kind of RULE on SELECT depending on existence of a WHERE condition
Previous Message rawi 2010-03-01 10:07:08 kind of RULE on SELECT depending on existence of a WHERE condition