Search Postgresql Archives

Where Statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux