" NOT a.attisdropped AND "
" a.atttypid = 'pg_catalog.name'::pg_catalog.regtype AND "
" c.relnamespace = n.oid AND "
- /* exclude pg_catalog and pg_temp_ (could be orphaned tables) */
- " n.nspname !~ '^pg_' AND "
- " n.nspname != 'information_schema'");
+ /* exclude possibly orphaned temp tables */
+ " n.nspname != 'pg_catalog' AND "
+ " n.nspname !~ '^pg_temp_' AND "
+ " n.nspname !~ '^pg_toast_temp_' AND "
+ " n.nspname != 'information_schema' ");
ntups = PQntuples(res);
i_nspname = PQfnumber(res, "nspname");
" NOT a.attisdropped AND "
" a.atttypid = 'pg_catalog.tsquery'::pg_catalog.regtype AND "
" c.relnamespace = n.oid AND "
- /* exclude pg_catalog and pg_temp_ (could be orphaned tables) */
- " n.nspname !~ '^pg_' AND "
- " n.nspname != 'information_schema'");
+ /* exclude possibly orphaned temp tables */
+ " n.nspname != 'pg_catalog' AND "
+ " n.nspname !~ '^pg_temp_' AND "
+ " n.nspname !~ '^pg_toast_temp_' AND "
+ " n.nspname != 'information_schema' ");
ntups = PQntuples(res);
i_nspname = PQfnumber(res, "nspname");
" NOT a.attisdropped AND "
" a.atttypid = 'pg_catalog.tsvector'::pg_catalog.regtype AND "
" c.relnamespace = n.oid AND "
- /* exclude pg_catalog and pg_temp_ (could be orphaned tables) */
- " n.nspname !~ '^pg_' AND "
- " n.nspname != 'information_schema'");
+ /* exclude possibly orphaned temp tables */
+ " n.nspname != 'pg_catalog' AND "
+ " n.nspname !~ '^pg_temp_' AND "
+ " n.nspname !~ '^pg_toast_temp_' AND "
+ " n.nspname != 'information_schema' ");
/*
* This macro is used below to avoid reindexing indexes already rebuilt
" NOT a.attisdropped AND " \
" a.atttypid = 'pg_catalog.tsvector'::pg_catalog.regtype AND " \
" c.relnamespace = n.oid AND " \
- " n.nspname !~ '^pg_' AND " \
- " n.nspname != 'information_schema') "
+ " n.nspname != 'pg_catalog' AND " \
+ " n.nspname !~ '^pg_temp_' AND " \
+ " n.nspname !~ '^pg_toast_temp_' AND " \
+ " n.nspname != 'information_schema')"
ntups = PQntuples(res);
i_nspname = PQfnumber(res, "nspname");
" pg_catalog.pg_namespace n "
"WHERE c.relkind = 'S' AND "
" c.relnamespace = n.oid AND "
- /* exclude pg_catalog and pg_temp_ (could be orphaned tables) */
- " n.nspname !~ '^pg_' AND "
- " n.nspname != 'information_schema'");
+ /* exclude possibly orphaned temp tables */
+ " n.nspname != 'pg_catalog' AND "
+ " n.nspname !~ '^pg_temp_' AND "
+ " n.nspname !~ '^pg_toast_temp_' AND "
+ " n.nspname != 'information_schema' ");
+
ntups = PQntuples(res);
i_nspname = PQfnumber(res, "nspname");