Where Statement - Mailing list pgsql-general

From Bob Pawley
Subject Where Statement
Date
Msg-id 00c201c5e558$416889e0$ac1d4318@OWNER
Whole thread Raw
Responses Re: Where Statement
List pgsql-general
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();

pgsql-general by date:

Previous
From: Brian Mathis
Date:
Subject: libpq version in rpm packages
Next
From: TJ O'Donnell
Date:
Subject: using new bitmap scans to index bit columns?