create or replace function add_user() returns opaque as '
declare
varname
begin
select myname into varname from table where myname = NEw.myname;
raise notice ''user name %'',varname;
update table set myage = 20 where myname = varname;
return new;
end;
can i know what is wrong with the above code?? coz if i perform an update, i will get a lot of notices for "user name %" eventhough i din perform a loop.
declare
varname
begin
select myname into varname from table where myname = NEw.myname;
raise notice ''user name %'',varname;
update table set myage = 20 where myname = varname;
return new;
end;
can i know what is wrong with the above code?? coz if i perform an update, i will get a lot of notices for "user name %" eventhough i din perform a loop.