From: lucas@presserv.org
To: PFC <lists@boutiquenumerique.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Relation in tables
Date: Thu, 17 Feb 2005 07:57:25 -0300
Message-ID: <20050217075725.q7hlx6iv076okogk@www.presserv.org> (raw)
In-Reply-To: <opsmaz8b14th1vuj@musicbox>
References: <20050216134301.5myrfpr3ck6bmswc@www.presserv.org>
<opsmaz8b14th1vuj@musicbox>
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: lucas@presserv.org, lists@boutiquenumerique.com
Subject: Re: Relation in tables
In-Reply-To: <20050217075725.q7hlx6iv076okogk@www.presserv.org>
References: <20050216134301.5myrfpr3ck6bmswc@www.presserv.org> <opsmaz8b14th1vuj@musicbox> <20050217075725.q7hlx6iv076okogk@www.presserv.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox