The following transfers the serial number of fluid_id into the two
tables, specification and pipe.
However, it doesn't follow the WHERE instruction. All fluid_id serial
numbers in process are transferred to fluid_id column in pipe with no
discrimination.
I can't see what I have done wrong.
Bob
------------
create or replace function base() returns trigger as $$ begin insert into specification (fluid_id) values (new.fluid_id);
create table pro as
select fluid_id from process where ip_op_reactor = 'ip'; insert into pipe (fluid_id) values (new.fluid_id); drop table pro ; return null; end; $$ language plpgsql; create trigger trig1 after insert on process
for each row execute procedure base(); |