Is it possible to incur a infinite loop through the creation of a Boolean query (e.g. Library catalog or google search)?
I'm not sure exactly what you mean by "Boolean query" (that is a pretty broad term), but if you simply mean, any expression in any language that evaluates to true or false, then I'd have to say yes.
I mean, what about something like this pseudo-code:
bool x = this() OR that()
function this()
return that()
function that()
return this()
That is to say, infinite recursion will always be possible if method calls are involved, assuming an infinitely recursive method is a potentiality in the programming language in question.
Or is that not what you meant?
The only common situation I can think of where infinite looping is not possible is where you have a language with a series of instructions, and it is impossible, once you have executed an instruction, to go to a previous instruction (or to repeat the current one). It might be that SQL does this sort of thing on a per-row basis, so infinite looping is impossible.