From: | Bob Pawley <rjpawley(at)shaw(dot)ca> |
---|---|
To: | Postgre General <pgsql-general(at)postgresql(dot)org> |
Subject: | Where Statement |
Date: | 2005-11-09 18:06:06 |
Message-ID: | 00c201c5e558$416889e0$ac1d4318@OWNER |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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();
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew T. O'Connor | 2005-11-09 18:12:31 | Re: libpq version in rpm packages |
Previous Message | Brian Mathis | 2005-11-09 17:33:04 | libpq version in rpm packages |