Re: Relation in tables - Mailing list pgsql-sql

From lucas@presserv.org
Subject Re: Relation in tables
Date
Msg-id 20050217075725.q7hlx6iv076okogk@www.presserv.org
Whole thread Raw
In response to Re: Relation in tables  (PFC <lists@boutiquenumerique.com>)
List pgsql-sql
>
>     Use a view per department, which show/hide the columns according to your
> liking. Give each department a schema and put everything related to it
> inside for cleanliness. Use UPDATE triggers on the views, which in fact
> write to the products table, so that the departments can only update the
> columns you like. You can even make some columns readable but not
> writeable, by raising an exception if a modification is attempted on that
> column.
>
>     If you want to reuse your code between departments, you will want all the
> views to have the same columns, so make them return NULL for the fields
> that they cannot see.
>
>     Finally don't forget to make the products table inaccessible the
> departments.
>

Okay, I will use Triggers to manage the insert and update table and viewers to
select records, but need I use more than one table (with inherits)? Or I just
use product table with the ALL departaments coluns and check the perms into
Triggers and Viewers???
Thanks



pgsql-sql by date:

Previous
From: "ALÝ ÇELÝK"
Date:
Subject: diff value retuns, debug mode and play mode
Next
From: Oliver Brück
Date:
Subject: No triggers visible for different user in information_schema.triggers