This should have been done for all similar queries to follow PostgreSQL's schema usage pattern.
However there was one missed at that time.
* regclass (or its variant) here, because temporary tables never have
* schema qualified name.
*/
-#define ISTEMPQUERY83 "SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname = '%s' AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'"
+#define ISTEMPQUERY83 "SELECT count(*) FROM pg_catalog.pg_class AS c, pg_namespace AS n WHERE c.relname = '%s' AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'"
/*
* Query to know if the target table is a temporary one. This query