But the docs don't actually say what X and Y are. Which is the needle
and which is the haystack? It does say "The glob(X,Y) function is
equivalent to the expression "Y GLOB X"." - but having never used GLOB
before in SQL, that's no help.
I think that you can infer it from the statement that "The GLOB operator
is similar to LIKE". The documentation for the "LIKE" operator notes
explicitly that the right-hand operand is the pattern (needle) and the
left-hand operand is the string to match against the pattern (haystack).
That said, it wouldn't hurt to reiterate this in the docs for "GLOB" and
the other functions/operators in this category.