Re: Minor ON CONFLICT related fixes - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Minor ON CONFLICT related fixes
Date
Msg-id CAM3SWZSY2BqOy2B0ukahU7J38iQJEK7DDnEmG3SEZcbcXwR4ZA@mail.gmail.com
Whole thread Raw
In response to Re: Minor ON CONFLICT related fixes  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Minor ON CONFLICT related fixes  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On Sat, May 16, 2015 at 11:48 PM, Peter Geoghegan <pg@heroku.com> wrote:
> FYI, I found an unrelated bug within ruleutils.c (looks like the
> targetlist kludge in set_deparse_planstate() isn't sufficiently
> general):
>
> postgres=# explain insert into upsert as u values('Bat', 'Bar') on
> conflict (key) do update set val = excluded.val where exists (select 1
> from upsert ii where ii.key = excluded.key);
> ERROR:  XX000: bogus varno: 65000
> LOCATION:  get_variable, ruleutils.c:5916

You pointed out that the reason for this trivial bug on Jabber, but
here's the obvious fix, including an EXPLAIN regression test.

--
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable
Next
From: "Ilya I. Ashchepkov"
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable