aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-05-23 00:49:27 +0200
committerAndres Freund <andres@anarazel.de>2015-05-23 00:58:45 +0200
commit631d7490074cdaef8026db57a5f2772b8730f600 (patch)
tree56d0aee92bbe994583e095111f9ea23135c31d1c /src/bin/psql/common.c
parent49ad32d5d99cb4a79bf648c0b7f9eca19b54cf1d (diff)
downloadpostgresql-631d7490074cdaef8026db57a5f2772b8730f600.tar.gz
postgresql-631d7490074cdaef8026db57a5f2772b8730f600.zip
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
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r--src/bin/psql/common.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index f4155f78770..ff01368531a 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -894,12 +894,9 @@ PrintQueryResults(PGresult *results)
success = StoreQueryTuple(results);
else
success = PrintQueryTuples(results);
- /*
- * if it's INSERT/UPSERT/UPDATE/DELETE RETURNING, also print status
- */
+ /* if it's INSERT/UPDATE/DELETE RETURNING, also print status */
cmdstatus = PQcmdStatus(results);
if (strncmp(cmdstatus, "INSERT", 6) == 0 ||
- strncmp(cmdstatus, "UPSERT", 6) == 0 ||
strncmp(cmdstatus, "UPDATE", 6) == 0 ||
strncmp(cmdstatus, "DELETE", 6) == 0)
PrintQueryStatus(results);