Can I have another function to return the last timestamp. I want to compare with this query to use the best query.
My query:
CREATE OR REPLACE FUNCTION f_last_update1(nomTable text , OUT updated timestamp)
LANGUAGE plpgsql AS
$func$
BEGIN
EXECUTE 'SELECT max(updated) FROM ' || nomTable
INTO updated;
END
$func$;