Where Statement
| От | Bob Pawley |
|---|---|
| Тема | Where Statement |
| Дата | |
| Msg-id | 00c201c5e558$416889e0$ac1d4318@OWNER обсуждение исходный текст |
| Ответы |
Re: Where Statement
|
| Список | 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
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;
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();
for each row execute procedure base();
В списке pgsql-general по дате отправления: