Re: PG12 change to DO UPDATE SET column references

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG12 change to DO UPDATE SET column references
Date: 2024-01-20 16:12:11
Message-ID: 3000510.1705767131@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

James Coleman <jtc331(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-20 16:45:12 Re: Patch: Improve Boolean Predicate JSON Path Docs
Previous Message Tom Lane 2024-01-20 16:03:07 Re: Make documentation builds reproducible