In this Topic:
Variable is not defined¶
In some cases, this error message might be caused by an ampersand (
&) inside a CREATE FUNCTION command because the ampersand is the variable substitution character. For example:
create function mask_bits(...) ... as $$ var masked = (x & y); ... $$;
The error will occur at the time that the function is created, not at the time that the function is called.
If you do not intend to use variable substitution, you can explicitly disable it. For example, in SnowSQL, you can disable variable substitution by executing the following command:
For more information about variable substitution, see Using Variables.