Re: Oracle's Virtual Private Database functionality - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Oracle's Virtual Private Database functionality
Date
Msg-id 20050314044444.GA30090@wolff.to
Whole thread Raw
In response to Oracle's Virtual Private Database functionality  ("Doug Bloebaum" <DBloebau@luxotticaRetail.com>)
List pgsql-general
On Wed, Mar 09, 2005 at 13:52:28 -0500,
  Doug Bloebaum <DBloebau@luxotticaRetail.com> wrote:
>
> It's apparent why: the view determines which table it's going to use at
> view creation time, not at query time, so this method is no good.
>
> Is there a "right way" to accomplish what I'm trying to do?

I think the normal way is to have the base tables have an extra attribute
column, an extra table mapping users (or something about the current
session) to attributes and a view for each base table combining the
base table with user to attribute table so that only appropiate rows
show up. If these need to be updatable, you will need to use rules on
the views.

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] A way to let Vacuum warn if FSM settings are
Next
From: Bruno Wolff III
Date:
Subject: Re: Postgres stored proc that extracts data from Oracle