aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw
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 /contrib/postgres_fdw
parent46208923446651a58c49115d17b4de6da4934c71 (diff)
downloadpostgresql-d61a361d1aef1231db61162d99b635b89c73169d.tar.gz
postgresql-d61a361d1aef1231db61162d99b635b89c73169d.zip
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 'contrib/postgres_fdw')
-rw-r--r--contrib/postgres_fdw/connection.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 29fcb6a76eb..f753c6e2324 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -1508,12 +1508,7 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
/* If cache doesn't exist, we return no records */
if (!ConnectionHash)
- {
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
-
PG_RETURN_VOID();
- }
hash_seq_init(&scan, ConnectionHash);
while ((entry = (ConnCacheEntry *) hash_seq_search(&scan)))
@@ -1578,8 +1573,6 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
}
- /* clean up and return the tuplestore */
- tuplestore_donestoring(tupstore);
PG_RETURN_VOID();
}