keyword-identifier (NM011)#
Automatic fix is not available.
What it does#
Checks for keywords used as identifiers.
Why not?#
According to the standard, reserved key words are the only real key words; they are never allowed as identifiers. Non-reserved key words only have a special meaning in particular contexts and can be used as identifiers in other contexts.
PostgreSQL won't allow reserved keywords as identifiers without double quotes. This means that if you use reserved keywords as identifiers, you have to always double quote them. That is annoying enough by hand and error-prone.
Eventhough, non-reserved keywords can be used as identifiers in certain contexts, it can be confusing and ambiguious. Also, there is nothing stopping non-reserved keywords from becoming reserved keywords in the future. So, it is best to avoid them altogether.
When should you?#
Never.
Use instead:#
Choose a name that is not a keyword.