summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-02-17 09:52:02 +0900
committerMichael Paquier <michael@paquier.xyz>2022-02-17 09:52:02 +0900
commitd61a361d1aef1231db61162d99b635b89c73169d (patch)
tree87cdc9beef527e6ff005748e5ef7029cfd302cce /src/backend/commands
parent46208923446651a58c49115d17b4de6da4934c71 (diff)
Remove all traces of tuplestore_donestoring() in the C code
This routine is a no-op since dd04e95 from 2003, with a macro kept around for compatibility purposes. This has led to the same code patterns being copy-pasted around for no effect, sometimes in confusing ways like in pg_logical_slot_get_changes_guts() from logical.c where the code was actually incorrect. This issue has been discussed on two different threads recently, so rather than living with this legacy, remove any uses of this routine in the C code to simplify things. The compatibility macro is kept to avoid breaking any out-of-core modules that depend on it. Reported-by: Tatsuhito Kasahara, Justin Pryzby Author: Tatsuhito Kasahara Discussion: https://postgr.es/m/20211217200419.GQ17618@telsasoft.com Discussion: https://postgr.es/m/CAP0=ZVJeeYfAeRfmzqAF2Lumdiv4S4FewyBnZd4DPTrsSQKJKw@mail.gmail.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/event_trigger.c6
-rw-r--r--src/backend/commands/extension.c9
-rw-r--r--src/backend/commands/prepare.c3
3 files changed, 0 insertions, 18 deletions
diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c
index 93c2099735a..1e8587502e5 100644
--- a/src/backend/commands/event_trigger.c
+++ b/src/backend/commands/event_trigger.c
@@ -1401,9 +1401,6 @@ pg_event_trigger_dropped_objects(PG_FUNCTION_ARGS)
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
return (Datum) 0;
}
@@ -2061,9 +2058,6 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS)
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
PG_RETURN_VOID();
}
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index a2e77c418a4..0e04304cb09 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -2021,9 +2021,6 @@ pg_available_extensions(PG_FUNCTION_ARGS)
FreeDir(dir);
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
return (Datum) 0;
}
@@ -2112,9 +2109,6 @@ pg_available_extension_versions(PG_FUNCTION_ARGS)
FreeDir(dir);
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
return (Datum) 0;
}
@@ -2417,9 +2411,6 @@ pg_extension_update_paths(PG_FUNCTION_ARGS)
}
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
return (Datum) 0;
}
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 206d2bbbf9f..e0c985ef8b0 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -778,9 +778,6 @@ pg_prepared_statement(PG_FUNCTION_ARGS)
}
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
rsinfo->returnMode = SFRM_Materialize;
rsinfo->setResult = tupstore;
rsinfo->setDesc = tupdesc;