I would like to do something like this, but it doesn't work...
CREATE FUNCTION kill(integer) RETURNS integer AS $$
DECLARE
pid ALIAS FOR $2;
BEGIN
-- Do some stuff here...
return kill TERM, pid;
END;
$$ LANGUAGE plpgsql;
Postgresql 8.3
UPGRADING is not an option, sorry...