Sidney Markowitz wrote on 4/01/23 8:47 pm:
There's a typo, which must just be in your email since postgres won't
accept it, that should be =+ not +=
I am not expert it SQL :)
Further testing reveals that there is no auto-increment operator in
postgres or SQLite SQL, neither += nor =+
The reason why =+ does not get a syntax error is because it is parsed as
two separate operators and whitespace is not required and is ignored. In
other words, totspace =+ 10 is the same as totspace = +10 which sets
totspace to the value 10, which is not what was intended.
The change to =+ doesn't fail the syntax, but does cause test
t/sql_based_welcomelist.t to fail because the results are wrong.
The only syntax that actually works is to include the table name as in
totspace = awl.totspace + 10
I have submitted a patch to that effect in bug 8098 for people who do
know SQL to review.
Benny, if you want to try out that patch, please do so.
Sidney