Declaring Keywords or Routine Names as SPL Variables
If you declare a variable with the same name as a keyword or as
the name of a routine, ambiguities can occur. Informix® uses
the following rules for resolving name conflicts among SPL variables,
UDR names, and built-in SQL function names.
- Variable names that are declared in DEFINE statements take the highest precedence.
- User-defined routines defined in CREATE PROCEDURE or CREATE FUNCTION statements take precedence over built-in SQL functions.
- Procedures declared with the PROCEDURE keyword in the DEFINE statement take precedence over built-in SQL functions.
- Built-in SQL functions take precedence over SPL procedures that exist in the database but that are not explicitly identified as procedures in the DEFINE statement.