Skip to content

Remove tuple-store INSERT EXEC implementation#771

Open
monk0707 wants to merge 1 commit into
babelfish-for-postgresql:BABEL_6_X_DEV__PG_18_Xfrom
monk0707:insert_exec_pr5_code-cleanup
Open

Remove tuple-store INSERT EXEC implementation#771
monk0707 wants to merge 1 commit into
babelfish-for-postgresql:BABEL_6_X_DEV__PG_18_Xfrom
monk0707:insert_exec_pr5_code-cleanup

Conversation

@monk0707

@monk0707 monk0707 commented Jun 15, 2026

Copy link
Copy Markdown

Description

This PR removes the old tuple-store based INSERT EXEC implementation from the engine side. The INSERT EXEC feature has been reimplemented using a DestReceiver-based approach in the extension side.

Changes:

  • Remove called_from_tsql_insert_exec_hook_type typedef from src/include/access/attmap.h
  • Remove called_from_tsql_insert_exec_hook extern declaration from attmap.h
  • Remove called_from_tsql_insert_exec_hook variable from src/backend/access/common/attmap.c
  • Remove hook usage from attmap.c type checking logic
  • Remove hook usage from src/backend/access/common/tupconvert.c value casting logic
  • Remove entire old tuple-store based INSERT EXEC implementation from src/backend/executor/nodeModifyTable.c (~60 lines)

Why:
The new DestReceiver-based approach:

  1. Uses a temp table to store results instead of tuple store
  2. Handles type coercion properly
  3. Provides better error handling and transaction semantics

The old engine-side hooks are no longer needed.

Related Extension PR: babelfish-for-postgresql/babelfish_extensions#4856

Issues Resolved

Cleanup of deprecated INSERT EXEC engine hooks as part of the DestReceiver-based INSERT EXEC reimplementation.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant