On Mon, Jan 8, 2018 at 11:19 PM, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote: > On 01/08/2018 05:25 PM, Márcio A. Sepp wrote: >> >> >> Hi, >> >> >> In pg10 generation series doesn't work like in 9.5. >> Ex. in 9.5: >> z=# select generate_series(1, 10), generate_series(1, 5); >> generate_series | generate_series >> -----------------+----------------- >> 1 | 1 >> 2 | 2 >> 3 | 3 >> 4 | 4 >> 5 | 5 >> 6 | 1 >> 7 | 2 >> 8 | 3 >> 9 | 4 >> 10 | 5 >> (10 registros) >> >> >> so, in version 10 the same sql show different result set. > > > The reason why: > > https://www.postgresql.org/docs/10/static/release-10.html#idm46428657945600 > > Change the implementation of set-returning functions appearing in a query's > SELECT list (Andres Freund) An interesting (and good) side effect of this change is that this query: select generate_series(1, nextval('s')), generate_series(1, nextval('s')); ...now terminates. merlin