Affect scoping in SQL stored function
Quote from the manual


  You can also set the behavior on a function-by-function basis, by inserting one of these special commands at the start of the function text:

#variable_conflict error
#variable_conflict use_variable
#variable_conflict use_column



But for readability (and maintainability) I would strongly suggest to rename the variable to something different. 

Many people simply use a prefix for the parameters (e.g. p_staff_id) and also prefixes for local variables (e.g. l_some_var) to make sure they never clash with each other or column names (this is also the de-facto standard in the Oracle world)