"David G. Johnston" <[email protected]> writes:
> On Friday, June 3, 2016, Tom Lane <[email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:
>> Merlin Moncure <[email protected]> writes:
>>> another interesting case today is:
>>> create sequence s;
>>> select generate_series(1,nextval('s')), generate_series(1,nextval('s'));
> If taking the 2.5 approach this one would fail as opposed to being
> rewritten.
Well, it'd be rewritten and then would fail at runtime because of the SRF
calls not producing the same number of rows. But even option #3 would not
be strictly bug-compatible because it would (I imagine) evaluate the
arguments of each SRF only once. The reason this case doesn't terminate
in the current implementation is that it re-evaluates the SRF arguments
each time we start a SRF over. That's just weird ...
regards, tom lane
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers