You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UPDATE with a table-qualified column throws a TypeError: UPDATE t SET u = t.u + 1 #2814
An UPDATE that names a column with its table, t.u, in SET or WHERE throws a TypeError. The same statement with the bare column name works.
Seen in the PostgreSQL regression tests run (alasql-pgsqltest): 12 statements in float4.sql, float8.sql, hash_index.sql and misc.sql, for example UPDATE FLOAT8_TBL SET f1 = FLOAT8_TBL.f1 * '-1' WHERE FLOAT8_TBL.f1 > '0.0'. Reproduced on develop (38bf3c3):
alasql('CREATE TABLE t (u INT)');alasql('INSERT INTO t VALUES (1), (2)');alasql('UPDATE t SET u = u + 1');// 2alasql('UPDATE t SET u = t.u + 1');// TypeError: undefined is not an object (evaluating 'r['t']['u']')alasql('UPDATE t SET u = 0 WHERE t.u > 1');// TypeError: undefined is not an object (evaluating 'r['t']['u']')
Expected: both statements update the rows, the same as with u.
Breaking?
No. Today they throw.
Related: #2792 (the same error from a correlated subquery in UPDATE and DELETE, probably the same cause).
Activity
mateuscmtropical commentedon Nov 11, 2026
Hi, I'd like to work on this one.
mateuscmtropical commentedon Nov 11, 2026
Hi, I've opened a PR for this: #2991