I am try to get a function to return the count of the rows updated within the function. As in the following, I wan the number of rows updated to be returned.
This is a simple update, other update statements that I need to write will be complicated.
CREATE OR REPLACE FUNCTION est_idio_return_stats_update() RETURNS integer AS
The above returns the following: ERROR: return type mismatch in function declared to return integer DETAIL: Function's final statement must be SELECT or INSERT/UPDATE/DELETE RETURNING. CONTEXT: SQL function "est_idio_return_stats_update"
********** Error **********
ERROR: return type mismatch in function declared to return integer SQL state: 42P13 Detail: Function's final statement must be SELECT or INSERT/UPDATE/DELETE RETURNING. Context: SQL function "est_idio_return_stats_update"