pgsql: Get rid of recursion-marker values in enum AlterTableType

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Get rid of recursion-marker values in enum AlterTableType
Date: 2022-12-12 14:11:25
Message-ID: E1p4jWe-003DSw-8H@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Get rid of recursion-marker values in enum AlterTableType

During ALTER TABLE execution, when prep-time handling of subcommands of
certain types determine that execution-time handling requires recursion,
they signal this by changing the subcommand type to a special value.
This can be done in a simpler way by using a separate flag introduced by
commit ec0925c22a3d, so do that.

Catversion bumped. It's not clear to me that ALTER TABLE subcommands
are stored anywhere in catalogs (CREATE FUNCTION rejects it in BEGIN
ATOMIC function bodies), but we do have both write and read support for
them, so be safe.

Discussion: https://postgr.es/m/20220929090033.zxuaezcdwh2fgfjb@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/840ff5f451cd9a391d237fc60894fea7ad82a189

Modified Files
--------------
src/backend/commands/tablecmds.c | 67 +++++-----------------
src/backend/parser/parse_utilcmd.c | 2 -
src/include/catalog/catversion.h | 2 +-
src/include/nodes/parsenodes.h | 5 --
.../modules/test_ddl_deparse/test_ddl_deparse.c | 20 ++-----
5 files changed, 18 insertions(+), 78 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-12-12 14:22:16 pgsql: Order getopt arguments
Previous Message Robins Tharakan 2022-12-12 12:28:55 Re: pgsql: postgres_fdw: Fix assertion in estimate_path_cost_size().