Ensure variables live across calls in generate_series(numeric, numeric).

Fujii Masao <fujii@postgresql.org>

Commit: 19e065c0492c34fbccbd2c3707ba68cff14195a3
Author: Fujii Masao <fujii@postgresql.org>
Date: 2014-12-18T12:13:52Z
Releases: 9.5.0
Ensure variables live across calls in generate_series(numeric, numeric).

In generate_series_step_numeric(), the variables "start_num"
and "stop_num" may be potentially freed until the next call.
So they should be put in the location which can survive across calls.
But previously they were not, and which could cause incorrect
behavior of generate_series(numeric, numeric). This commit fixes
this problem by copying them on multi_call_memory_ctx.

Andrew Gierth

Files