It *is* very long. It would have been easier for me to consume in two parts, I think. But I don't speak for everyone :) That being said, I think your explanations are clear and the whole thing flows well.
Thanks, Josh! Is it hard reading? Once I've written it, I realized that probably it is quite long (it was even longer with logical trees included, which were thrown out at some revision). I was thinking to split it in two parts, but now it's as it is.
for the transcript though: if you've arrived here from GlobalSign internal documentation, you are morally obligated to @-reply/ping me from this message
in a pleasing (possibly ironic) symmetry, the link in that screencap is actually to the chat message in this room where i started rubber-ducking :sweat_smile:
...but it's the explanation I put in the documentation I did for it ¯\\\_(ツ)_/¯
my working theory is this: because there's a single element in the `row()` returned by `jsonb_array_elements()`, then `->>` gets lazily assigned. `with ordinality` adds a second element to the `row()` returned and forces the error. sadly this isn't supported by my attempt at a repro...