Hi,
A common mistake is to try and qualify column references on the LHS of
SET in UPDATE. The error message can be a bit cryptic at times, too.
I've attached a patch to try and improve the situation a bit:
=# create table foo(bar int);
CREATE TABLE
=# update foo set foo.bar = 1;
ERROR: column "foo" of relation "foo" does not exist
LINE 1: update foo set foo.bar = 1;
^
HINT: Target column references in UPDATE must not be qualified
=# update foo set notfoo.bar = 1; -- no hint
ERROR: column "notfoo" of relation "foo" does not exist
LINE 1: update foo set notfoo.bar = 1;
^
=# update foo set foo.bar[1] = 1;
ERROR: column "foo" of relation "foo" does not exist
LINE 1: update foo set foo.bar[1] = 1;
^
HINT: Target column references in UPDATE must not be qualified
I'll add this to the next CF, but feel free to bash it before that.
.marko