where-udf

User Defined Function used in WHERE clause

Rule "where-udf" gives this warning when it finds a user defined funtion in a WHERE clause.

the risc:

If the user defined function accesses the database (contains FIND, FOR, QUERY) then you may get run-time error 7254 (in Progress 9) or may corrupt your database (in Progress 8). See also knowledge base articles 19561 and 20031.

how it works:

Prolint first tries to find the name of the function in your "whitelist" to see if the function must be regarded as harmless. If the name is not in the whitelist, Prolint tries to find the implementation of the function in the current compilation-unit. If the implementation is found and contains no statements that can possibly access the database, then the function is regarded as harmless. Otherwise, the function is regarded as possibly dangerous and Prolint will raise its warning.

How to suppress these warnings:

You can maintain a "whitelist" of user defined functions for which you know they are harmless: create a file named "where-udf.lst" in directory "prolint/settings" and/or in directory "local-prolint/settings" (both lists will be imported if they exist). File where-udf.lst is a normal text-file, each line contains one function-name (without quotes or other delimiters).

You can put directive {&_proparse_ prolint-nowarn(where-udf)} directly before
the DEFINE keyword.
See also: suppress warnings.