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
column
And all this time I thought that you couldn't write to a view.
You can't.
But you can make it seem so you can.
You can create an ON UPDATE/INSERT trigger on a view which intercepts the
UPDATE/INSERT to the view (which would otherwise fail) and do whatever you
want with it, includi
PFC <[EMAIL PROTECTED]> writes:
> You can create an ON UPDATE/INSERT trigger on a view which intercepts the
> UPDATE/INSERT to the view (which would otherwise fail) and do whatever you
> want with it, including doing the operation on the real table.
This might work for INSERT but I really doub
On Wed, 16 Feb 2005 19:56:25 +0100, PFC wrote
> [snip] Use UPDATE triggers on the
> views, which in fact write to the products table [snip]
You can DO that!?!
Are you saying that a client can DELETE or INSERT or UPDATE a view and through
a trigger you can make this happen? Way cool. Can you p
Hello all...
I am starting in Postgresql...
And I have a question:
I am developing a DB system to manage products, but the products may be
separated by departaments (with its respectives coluns)... Like:
CREATE TABLE products(
id serial primary key,
desc valchar(100),
...
);
Okay, but
mailto:[EMAIL PROTECTED]
> Sent: Mittwoch, 16. Februar 2005 17:43
> To: pgsql-sql@postgresql.org
> Subject: [SQL] Relation in tables
>
>
> Hello all...
> I am starting in Postgresql...
> And I have a question:
> I am developing a DB system to manage products, but th
Hello all...
I am starting in Postgresql...
And I have a question:
I am developing a DB system to manage products, but the products may be
separated by departaments (with its respectives coluns)... Like:
CREATE TABLE products(
id serial primary key,
desc valchar(100),
...
);
Okay, but