mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Remove the new UPSERT command tag and use INSERT instead.
Previously, INSERT with ON CONFLICT DO UPDATE specified used a new command tag -- UPSERT. It was introduced out of concern that INSERT as a command tag would be a misrepresentation for ON CONFLICT DO UPDATE, as some affected rows may actually have been updated. Alvaro Herrera noticed that the implementation of that new command tag was incomplete; in subsequent discussion we concluded that having it doesn't provide benefits that are in line with the compatibility breaks it requires. Catversion bump due to the removal of PlannedStmt->isUpsert. Author: Peter Geoghegan Discussion: 20150520215816.GI5885@postgresql.org
This commit is contained in:
@ -261,8 +261,6 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
|
||||
result->queryId = parse->queryId;
|
||||
result->hasReturning = (parse->returningList != NIL);
|
||||
result->hasModifyingCTE = parse->hasModifyingCTE;
|
||||
result->isUpsert =
|
||||
(parse->onConflict && parse->onConflict->action == ONCONFLICT_UPDATE);
|
||||
result->canSetTag = parse->canSetTag;
|
||||
result->transientPlan = glob->transientPlan;
|
||||
result->planTree = top_plan;
|
||||
|
Reference in New Issue
Block a user