pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Correctly check updatability of columns targeted by INSERT...DEF 7+ messages / 1 participants [nested] [flat]
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/041a00c4803b982d8433d6e3161ca61e73050658 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 35 ++++++++++++++++----------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 25 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/220003b9b93729af1ffa861d1ae5f4724ce22cd8 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 35 ++++++++++++++++----------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 25 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/feca6c688cd99c68ce10caf21f8566b2483ca3f2 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 29 ++++++++++++++++++--------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 23 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fd958bbbdf20c7f29188ee6f2687773edf0228af Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 35 ++++++++++++++++----------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 25 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0d712ec12a904eb517a572581ca607d4ff9c19c1 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 29 ++++++++++++++++++--------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 23 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/461f47948553f61690732492eac58b33afba9756 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 29 ++++++++++++++++++--------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 23 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Correctly check updatability of columns targeted by INSERT...DEF @ 2024-07-20 17:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-07-20 17:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Correctly check updatability of columns targeted by INSERT...DEFAULT. If a view has some updatable and some non-updatable columns, we failed to verify updatability of any columns for which an INSERT or UPDATE on the view explicitly specifies a DEFAULT item (unless the view has a declared default for that column, which is rare anyway, and one would almost certainly not write one for a non-updatable column). This would lead to an unexpected "attribute number N not found in view targetlist" error rather than the intended error. Per bug #18546 from Alexander Lakhin. This bug is old, so back-patch to all supported branches. Discussion: https://postgr.es/m/18546-84a292e759a9361d@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/96953052a12c9cc87700bdca5fa030626a80e707 Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 29 ++++++++++++++++++--------- src/test/regress/expected/updatable_views.out | 3 +++ src/test/regress/sql/updatable_views.sql | 1 + 3 files changed, 23 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2024-07-20 17:40 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us> 2024-07-20 17:40 pgsql: Correctly check updatability of columns targeted by INSERT...DEF Tom Lane <tgl@sss.pgh.pa.us>
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