Fix a query passed to relcache so that it uses schema qualified table name.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 8 Nov 2018 05:37:18 +0000 (14:37 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 8 Nov 2018 05:37:18 +0000 (14:37 +0900)
This should have been done for all similar queries to follow PostgreSQL's schema usage pattern.
However there was one missed at that time.

src/utils/pool_select_walker.c

index 30273a8103bc3e1f0bf2037b08d9d251da89bc47..8ed75e8c0ad91dfc046668af91f1020eb8aee85d 100644 (file)
@@ -557,7 +557,7 @@ static bool is_temp_table(char *table_name)
  * 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