pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Record dependencies on the target columns of MERGE actions. 6+ messages / 1 participants [nested] [flat]
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2df3d9e2b042dd8cebb65ccbbb515ff583443a9f Modified Files -------------- src/backend/catalog/dependency.c | 52 +++++++++++++++++------ src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++++ src/test/regress/expected/rules.out | 44 +++++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ src/test/regress/sql/rules.sql | 19 +++++++++ 5 files changed, 166 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c6f3a5e968a65d5f9fd19df81dd1697a2083bc6a Modified Files -------------- src/backend/catalog/dependency.c | 52 +++++++++++++++++------ src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++++ src/test/regress/expected/rules.out | 44 +++++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ src/test/regress/sql/rules.sql | 19 +++++++++ 5 files changed, 166 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a98b2c79e8772921cd4e63bdfbbff5db731d7aa0 Modified Files -------------- src/backend/catalog/dependency.c | 52 +++++++++++++++++------ src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++++ src/test/regress/expected/rules.out | 44 +++++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ src/test/regress/sql/rules.sql | 19 +++++++++ 5 files changed, 166 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a1725d9fcede2904ebd7506c306e38fe3912a999 Modified Files -------------- src/backend/catalog/dependency.c | 52 +++++++++++++++++------ src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++++ src/test/regress/expected/rules.out | 44 +++++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ src/test/regress/sql/rules.sql | 19 +++++++++ 5 files changed, 166 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/30d95d7318e79e1816065f75cbe7f1d31d427f97 Modified Files -------------- src/backend/catalog/dependency.c | 56 ++++++++++++++++++----- src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ 3 files changed, 108 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Record dependencies on the target columns of MERGE actions. @ 2026-11-23 19:22 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2026-11-23 19:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record dependencies on the target columns of MERGE actions. For an INSERT or UPDATE query, we add a dependency on each target column, to guard against things like dropping the column or altering its type, but MERGE didn't get the memo. Fix by also adding a dependency on each target column of each INSERT or UPDATE action of a MERGE query. Backpatch to v15, where MERGE was introduced. Note: This won't fix existing rules or SQL-standard function bodies, unless they're re-created. Reported-by: Henson Choi <assam258@gmail.com> Author: Henson Choi <assam258@gmail.com> Reviewed-by: Prashant Chinnam <crprashant@hotmail.com> Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com> Discussion: https://postgr.es/m/CAAAe_zBHzEFR9bFSiJYfve7%3DQoWG_cL8%2BTWxx8vz47Jy0kUSHQ%40mail.gmail.com Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1a2c9d1c55064ed23daaf5bd0ef98abf95e56d24 Modified Files -------------- src/backend/catalog/dependency.c | 56 ++++++++++++++++++----- src/test/regress/expected/create_function_sql.out | 43 +++++++++++++++++ src/test/regress/sql/create_function_sql.sql | 21 +++++++++ 3 files changed, 108 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-11-23 19:22 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com> 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com> 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com> 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com> 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com> 2026-11-23 19:22 pgsql: Record dependencies on the target columns of MERGE actions. Dean Rasheed <dean.a.rasheed@gmail.com>
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