I was looking at PL/pgSQL documentation and realized that contrary to spec, I've been omitting the colon ':' from assignments, e.g. writing
'x = 5' rather than the correct 'x := 5'
I don't see any error messages about this.
this is undocumented feature, that should not be removed due possible compatibility issues.
see comments from gram.y
* Ada-based PL/SQL uses := for assignment and variable defaults, while * the SQL standard uses equals for these cases and for GET * DIAGNOSTICS, so we support both. FOR and OPEN only support :=.
Personally I am thinking, so this design is unhappy, but at the end this is small problem not too important to solve.
Regards
Pavel
I am not aware of any problems due to this. I suppose that if a condition precedes this syntax, the code could be interpreted as an equals test.
Should I immediately update all assignments ?
Are there known scenarios where this error becomes a problem ?