Re: Puzzline CROSS JOIN when doing RECURSIVE CTE

2022-04-18 Thread Alban Hertroys
> On 18 Apr 2022, at 14:51, Pól Ua Laoínecháin wrote: > > Hi Alban, and many thanks for your input. > >> My first question is why you’re using a recursive CTE here? This doesn’t >> appear to be hierarchical data (such as a tree), unless perhaps you intended >> to actually traverse the HTML d

Re: Puzzline CROSS JOIN when doing RECURSIVE CTE

2022-04-18 Thread Pól Ua Laoínecháin
Hi Alban, and many thanks for your input. > My first question is why you’re using a recursive CTE here? This doesn’t > appear to be hierarchical data (such as a tree), unless perhaps you intended > to actually traverse the HTML document hierarchy? This is basically an exercise on my part. The

Re: Puzzline CROSS JOIN when doing RECURSIVE CTE

2022-04-18 Thread Alban Hertroys
> On 18 Apr 2022, at 11:56, Pól Ua Laoínecháin wrote: (…) > All of the code below is available on the fiddle here: > > https://dbfiddle.uk/?rdbms=postgres_13&fiddle=0cc20c9081867131260e6e3550bd08ab (…) > OK, grand, now I wish to perform a RECURSIVE CTE on it. So, I start by > trying someth

Puzzline CROSS JOIN when doing RECURSIVE CTE

2022-04-18 Thread Pól Ua Laoínecháin
Hi all, I've been working on a recursive query (I've already written a few, so I'm not a complete newbie.. All of the code below is available on the fiddle here: https://dbfiddle.uk/?rdbms=postgres_13&fiddle=0cc20c9081867131260e6e3550bd08ab I have a table called line SELECT idx, length, s