public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: Whole-row fixes for ALTER COLUMN SET EXPRESSION
2+ messages / 1 participants
[nested] [flat]

* pgsql: Whole-row fixes for ALTER COLUMN SET EXPRESSION
@ 2026-07-08 17:58  Peter Eisentraut <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-07-08 17:58 UTC (permalink / raw)
  To: [email protected]

Whole-row fixes for ALTER COLUMN SET EXPRESSION

When changing the expression of a generated column via ALTER TABLE
ALTER COLUMN SET EXPRESSION, objects that depend on the column via
indirect whole-row references (such as CHECK constraints, indexes)
must be handled specially, because technically pg_depend does not
contain such dependencies, see
recordDependencyOnSingleRelExpr->find_expr_references_walker.

This is a fix for commit f80bedd52, "Allow ALTER COLUMN SET EXPRESSION
on virtual columns with CHECK constraints".

Author: jian he <[email protected]>
Co-authored-by: Peter Eisentraut <[email protected]>
Reported-by: Ayush Tiwari <[email protected]>
Reviewed-by: Ayush Tiwari <[email protected]>
Reviewed-by: solai v <[email protected]>
Reviewed-by: Zsolt Parragi <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CAJTYsWXOkyeDVbzymWc9sKrq7Y_MUv6XJXN4H9GfsBOPd3NJ+w@mail....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a4639d64e2199885f8e995395b6fe874cb7228bf

Modified Files
--------------
src/backend/commands/tablecmds.c                | 176 ++++++++++++++++++++++++
src/test/regress/expected/generated_stored.out  |   9 ++
src/test/regress/expected/generated_virtual.out |   9 ++
src/test/regress/sql/generated_stored.sql       |  10 ++
src/test/regress/sql/generated_virtual.sql      |  10 ++
5 files changed, 214 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Whole-row fixes for ALTER COLUMN SET EXPRESSION
@ 2026-07-08 17:58  Peter Eisentraut <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-07-08 17:58 UTC (permalink / raw)
  To: [email protected]

Whole-row fixes for ALTER COLUMN SET EXPRESSION

When changing the expression of a generated column via ALTER TABLE
ALTER COLUMN SET EXPRESSION, objects that depend on the column via
indirect whole-row references (such as CHECK constraints, indexes)
must be handled specially, because technically pg_depend does not
contain such dependencies, see
recordDependencyOnSingleRelExpr->find_expr_references_walker.

This is a fix for commit f80bedd52, "Allow ALTER COLUMN SET EXPRESSION
on virtual columns with CHECK constraints".

Author: jian he <[email protected]>
Co-authored-by: Peter Eisentraut <[email protected]>
Reported-by: Ayush Tiwari <[email protected]>
Reviewed-by: Ayush Tiwari <[email protected]>
Reviewed-by: solai v <[email protected]>
Reviewed-by: Zsolt Parragi <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CAJTYsWXOkyeDVbzymWc9sKrq7Y_MUv6XJXN4H9GfsBOPd3NJ+w@mail....

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9530898940302d6f501fb54a3fbc61cbfb7768bf

Modified Files
--------------
src/backend/commands/tablecmds.c                | 176 ++++++++++++++++++++++++
src/test/regress/expected/generated_stored.out  |   9 ++
src/test/regress/expected/generated_virtual.out |   9 ++
src/test/regress/sql/generated_stored.sql       |  10 ++
src/test/regress/sql/generated_virtual.sql      |  10 ++
5 files changed, 214 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-08 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-08 17:58 pgsql: Whole-row fixes for ALTER COLUMN SET EXPRESSION Peter Eisentraut <[email protected]>
2026-07-08 17:58 pgsql: Whole-row fixes for ALTER COLUMN SET EXPRESSION Peter Eisentraut <[email protected]>

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