diff options
Diffstat (limited to 'contrib/spi/timetravel.c')
| -rw-r--r-- | contrib/spi/timetravel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c index 69ec627868..34b4453f87 100644 --- a/contrib/spi/timetravel.c +++ b/contrib/spi/timetravel.c @@ -345,11 +345,10 @@ timetravel(PG_FUNCTION_ARGS) /* * Remember that SPI_prepare places plan in current memory context - - * so, we have to save plan in Top memory context for latter use. + * so, we have to save plan in Top memory context for later use. */ - pplan = SPI_saveplan(pplan); - if (pplan == NULL) - elog(ERROR, "timetravel (%s): SPI_saveplan returned %d", relname, SPI_result); + if (SPI_keepplan(pplan)) + elog(ERROR, "timetravel (%s): SPI_keepplan failed", relname); plan->splan = pplan; } |
