pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17811: Replacing an underlying view breaks OLD/NEW tuple when accessing it via upper-level view
Date: Wed, 8 Mar 2023 09:00:00 +0300
Message-ID: <b941ef12-c466-2eee-c3d4-f3c882ec0d16@gmail.com> (raw)
In-Reply-To: <4022282.1678214585@sss.pgh.pa.us>
References: <17811-d31686b78f0dffc9@postgresql.org>
	<4022282.1678214585@sss.pgh.pa.us>

07.03.2023 21:43, Tom Lane wrote:
> I've looked into this a bit more, and both of these symptoms reduce
> to the same thing: after we've plugged the modified view's query
> into the upper query, we have an RTE_SUBQUERY RTE whose eref->colnames
> list is shorter than the number of columns actually available from the
> subquery.  This breaks assorted code that is expecting that it can
> use list_length(eref->colnames) as a quick guide to the number of
> output columns.

Thanks for the fix!
I've tested all my cases on REL_15_STABLE, master and found no
anomalies in this area.

Best regards,
Alexander





view thread (4+ messages)

Message-ID: <b941ef12-c466-2eee-c3d4-f3c882ec0d16@gmail.com>
Permalink:  ../b941ef12-c466-2eee-c3d4-f3c882ec0d16@gmail.com/
Also on:    postgresql.org/message-id/b941ef12-c466-2eee-c3d4-f3c882ec0d16@gmail.com

 · 

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-bugs@postgresql.org
  Cc: exclusion@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17811: Replacing an underlying view breaks OLD/NEW tuple when accessing it via upper-level view
  In-Reply-To: <b941ef12-c466-2eee-c3d4-f3c882ec0d16@gmail.com>

* 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