Re: [sqlite] PRAGMA reverse_unordered_selects and CTEs

2014-11-21 Thread Richard Hipp
On Fri, Nov 21, 2014 at 5:58 AM, snowbiwan wrote: > > If this is not a bug, then this behaviour should be mentioned on either the > Pragma, or WITH Clause documentation pages. > Not a bug. https://www.sqlite.org/docsrc/info/3d72482e471 -- D. Richard Hipp d...@sqlite.org __

[sqlite] PRAGMA reverse_unordered_selects and CTEs

2014-11-21 Thread snowbiwan
I was experimenting with ways to return only the last row of a recursive CTE, when I came across some curious behaviour. The following two examples were run from the shell of 3.8.7.2: 1) PRAGMA reverse_unordered_selects = OFF; WITH RECURSIVE i(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM i L