>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
Andrew> The easy to catch case, I think, is when the targetlist of theAndrew> IN or NOT IN subquery contains vars of
theouter query levelAndrew> but no vars of the inner one and no volatile functions. ThisAndrew> can be checked for with
ahandful of lines in the parser or aAndrew> couple of dozen lines in a plugin module (though one would haveAndrew> to
inventan error code, none of the existing WARNING sqlstatesAndrew> would do).
Actually thinking about this, if you did it in a module, you'd probably
want to make it an ERROR not a WARNING, because you'd want to actually
stop queries like
delete from t1 where x in (select x from table_with_no_column_x);
rather than let them run.
--
Andrew (irc:RhodiumToad)