This function is STABLE as it only queries data.
To allow passing as NULL to functions, remove NOT NULL from declaration.
Add find_reportable_interval function.
Configure DAO support for find_reportable_interval stored procedure.