pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: sqlsmith: ERROR: XX000: bogus varno: 2
Date: Sun, 19 Dec 2021 16:17:16 -0500
Message-ID: <2209221.1639948636@sss.pgh.pa.us> (raw)
In-Reply-To: <20211219205422.GT17618@telsasoft.com>
References: <20211219205422.GT17618@telsasoft.com>

Justin Pryzby <pryzby@telsasoft.com> writes:
> I reduced the problematic query to this.
> SELECT 1 FROM pg_rewrite WHERE
> pg_get_function_arg_default(ev_class, 1) !~~
> pg_get_expr(ev_qual, ev_class, false);

Or more simply,

regression=# select pg_get_expr(ev_qual, ev_class, false) from pg_rewrite where rulename = 'pg_settings_u';
ERROR:  bogus varno: 2

I don't see anything particularly surprising here.  pg_get_expr is only
able to cope with expression trees over a single relation, but ON UPDATE
rules can refer to both OLD and NEW relations.  Maybe we could make the
error message more friendly, but there's not much else to be done,
I think.

			regards, tom lane





view thread (16+ messages)  latest in thread

Message-ID: <2209221.1639948636@sss.pgh.pa.us>
Permalink:  ../2209221.1639948636@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2209221.1639948636@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pryzby@telsasoft.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: sqlsmith: ERROR: XX000: bogus varno: 2
  In-Reply-To: <2209221.1639948636@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox