"Matthew T. O'Connor" <matthew@zeut.net> writes:
> Just to be sure, I can do this by avoiding anything found in the pg_temp
> schemea, or is there a better way? Is it possible that a user could or
> would put a non-temp table the pg_temp schemea?
The pg_temp_NN schemas are the temp objects, by definition and by
implementation. (Essentially, the reason a temp table is temp is that
its backend does "DROP SCHEMA pg_temp_NN" on exit.) See namespace.c,
particularly the isTempNamespace and isOtherTempNamespace functions, for
the gory details.
regards, tom lane