Dear colleagues,

I'm running Pg 9.1 and have schema like the following:

create table machines (
        mid     serial not null primary key,
        mname   text not null unique
);

create table fs (
        fsid    serial not null primary key,
        mid     int not null references machines,
        mpoint  text not null
);
create unique index fs_mp on fs(mid, mpoint);

create view fsl as
        select fsid,mid,mname,mpoint
        from fs join machines using(mid);


Now, I want to create trigger so I can issue

insert into fsl (mname,mpoint) values ('server','/usr')

I understand I should use smth like 

create trigger fsl_update instead of insert or update on fsl ...

but till now did not succeed in it.  Quick googlink did not help either.

Could you point me to the right direction?

Thank you!


-- 
Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 ma...@freebsd.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru ***
------------------------------------------------------------------------


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to