We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffd587a commit 13367c1Copy full SHA for 13367c1
1 file changed
src/postgresql/database_postgresql.c
@@ -244,18 +244,16 @@ static int map_spi_result (int rc) {
244
}
245
246
247
-static void clear_fetch_batch(pg_stmt_t *stmt) {
+static void clear_fetch_batch (pg_stmt_t *stmt) {
248
if (!stmt) return;
249
- if (stmt->last_tuptable) {
250
- SPI_freetuptable(stmt->last_tuptable);
251
- stmt->last_tuptable = NULL;
252
- }
+ if (stmt->row_mcxt) MemoryContextReset(stmt->row_mcxt);
+
253
stmt->current_tuple = NULL;
254
stmt->current_tupdesc = NULL;
255
- if (stmt->row_mcxt) MemoryContextReset(stmt->row_mcxt);
+ stmt->last_tuptable = NULL;
256
257
258
-static void close_portal(pg_stmt_t *stmt) {
+static void close_portal (pg_stmt_t *stmt) {
259
260
if (stmt->portal) {
261
SPI_cursor_close(stmt->portal);
0 commit comments