Re: BUG #17811: Replacing an underlying view breaks OLD/NEW tuple when accessing it via upper-level view
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2023-03-08T06:00:00Z
Lists: pgsql-bugs
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
Commits
-
Fix more bugs caused by adding columns to the end of a view.
- 99be6feec971 16.0 landed
- 76d2177fb693 15.3 landed
- 9f1e51b59673 14.8 landed
- 721626cb57c0 11.20 landed
- 695b34ab359d 13.11 landed
- 5a19da58eed2 12.15 landed
-
Fix crash when columns have been added to the end of a view.
- d5b760ecb5e1 11.0 cited