Hello
2010/3/8 A B :
> Hello.
> Doesn't this work in plpgsql functions?
>
> EXECUTE 'UPDATE mytable set ... ...'
> IF FOUND THEN
> do stuff
> END IF;
>
it doesn't work - you have to use GET DIAGNOSTICS statement
GET DIAGNOSTICS integer_var = ROW_COUNT;
http://www.postgresql.org/docs/8.
Hello.
Doesn't this work in plpgsql functions?
EXECUTE 'UPDATE mytable set ... ...'
IF FOUND THEN
do stuff
END IF;
It seems it always evaluate to false in the if statement, Isn't found
used to see if an update has modified rows?
Are there any alternatives to selecting the row and see