I must be reading the wrong documentation but i just can't get the following
I don't get an error but it appears as if the function goes in to a loop.
I could do this with PHP but would really like to get it right in plpgsql.
could someone please look at it and also add a 'plpgsql for dummies' URL
drop function fun_power_ups();
create function fun_power_ups() RETURNS OPAQUE as '
update power set ups = substring(power.phase from 1 for 1)
where old.power_id = new.power_id;
' language 'plpgsql';
drop trigger tri_power_ups on power;
create trigger tri_power_ups after insert or update on power for each row
execute PROCEDURE fun_power_ups();
(this is all on one table.)
pgsql-novice by date
|Next:||From: Oliver Elphick||Date: 2002-09-17 16:11:11|
|Subject: Re: Problems understanding functions.|
|Previous:||From: Andrew Sullivan||Date: 2002-09-17 15:19:44|
|Subject: Re: [GENERAL] Still big problems with pg_dump!|