Bruce Momjian <pgman@candle.pha.pa.us> writes:
> ! "WHERE n.nspname NOT LIKE 'pg_temp_%%' OR\n"
You forgot that '_' is a special character for LIKE. You need some
backslashes there (4 apiece, I think).
Also, there had better be parentheses around the whole OR clause;
else I'm not sure that the precedence will work correctly if
processNamePattern plasters an AND phrase after this.
regards, tom lane