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