Re: PG12 change to DO UPDATE SET column references
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Coleman <jtc331@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-20T16:12:11Z
Lists: pgsql-hackers
James Coleman <jtc331@gmail.com> writes:
> Suppose I have this table:
> create table foo (id int primary key);
> On PG11 this works:
> postgres=# insert into foo (id) values (1) on conflict (id) do update
> set foo.id = 1;
> INSERT 0 1
Hmm, are you sure about that? I get
ERROR: column "foo" of relation "foo" does not exist
LINE 2: on conflict (id) do update set foo.id = 1;
^
in every branch back to 9.5 where ON CONFLICT was introduced.
I'm checking branch tip in each case, so conceivably this is
something that was changed post-11.0, but I kinda doubt we
would have back-patched it.
regards, tom lane
Commits
-
Add hint about not qualifying UPDATE...SET target with relation name.
- 58447e31890a 17.0 landed