Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ExecComputeStoredGeneratedCompat macro #3301

Merged
merged 1 commit into from Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/copy.c
Expand Up @@ -367,11 +367,8 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call
/* Compute stored generated columns */
if (check_resultRelInfo->ri_RelationDesc->rd_att->constr &&
check_resultRelInfo->ri_RelationDesc->rd_att->constr->has_generated_stored)
#if PG13_GE
ExecComputeStoredGenerated(estate, myslot, CMD_INSERT);
#else
ExecComputeStoredGenerated(estate, myslot);
#endif
ExecComputeStoredGeneratedCompat(estate, myslot, CMD_INSERT);

/*
* If the target is a plain table, check the constraints of
* the tuple.
Expand Down
8 changes: 1 addition & 7 deletions tsl/src/nodes/data_node_copy.c
Expand Up @@ -182,13 +182,7 @@ data_node_copy_exec(CustomScanState *node)

if (NULL != rri_chunk->ri_projectReturning && rri_desc->constr &&
rri_desc->constr->has_generated_stored)
ExecComputeStoredGenerated(estate,
slot
#if PG13_GE
,
CMD_INSERT
#endif
);
ExecComputeStoredGeneratedCompat(estate, slot, CMD_INSERT);

ResetPerTupleExprContext(estate);
oldmctx = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
Expand Down
8 changes: 1 addition & 7 deletions tsl/src/nodes/data_node_dispatch.c
Expand Up @@ -709,13 +709,7 @@ handle_read(DataNodeDispatchState *sds)

if (NULL != rri->ri_projectReturning && rri_desc->constr &&
rri_desc->constr->has_generated_stored)
ExecComputeStoredGenerated(estate,
slot
#if PG13_GE
,
CMD_INSERT
#endif
);
ExecComputeStoredGeneratedCompat(estate, slot, CMD_INSERT);

Assert(NULL != cis);

Expand Down