|
|
@ -59,9 +59,10 @@ old_8_3_check_for_name_data_type_usage(ClusterInfo *cluster) |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" a.atttypid = 'pg_catalog.name'::pg_catalog.regtype AND " |
|
|
|
" a.atttypid = 'pg_catalog.name'::pg_catalog.regtype AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
/* exclude pg_catalog and pg_temp_ (could be orphaned tables) */ |
|
|
|
/* exclude possible orphaned temp tables */ |
|
|
|
" n.nspname !~ '^pg_' AND " |
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
" n.nspname != 'information_schema'"); |
|
|
|
" n.nspname !~ '^pg_toast_temp_' AND " |
|
|
|
|
|
|
|
" n.nspname NOT IN ('pg_catalog', 'information_schema')"); |
|
|
|
|
|
|
|
|
|
|
|
ntups = PQntuples(res); |
|
|
|
ntups = PQntuples(res); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
@ -149,9 +150,10 @@ old_8_3_check_for_tsquery_usage(ClusterInfo *cluster) |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" a.atttypid = 'pg_catalog.tsquery'::pg_catalog.regtype AND " |
|
|
|
" a.atttypid = 'pg_catalog.tsquery'::pg_catalog.regtype AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
/* exclude pg_catalog and pg_temp_ (could be orphaned tables) */ |
|
|
|
/* exclude possible orphaned temp tables */ |
|
|
|
" n.nspname !~ '^pg_' AND " |
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
" n.nspname != 'information_schema'"); |
|
|
|
" n.nspname !~ '^pg_toast_temp_' AND " |
|
|
|
|
|
|
|
" n.nspname NOT IN ('pg_catalog', 'information_schema')"); |
|
|
|
|
|
|
|
|
|
|
|
ntups = PQntuples(res); |
|
|
|
ntups = PQntuples(res); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
@ -247,9 +249,10 @@ old_8_3_rebuild_tsvector_tables(ClusterInfo *cluster, bool check_mode) |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" NOT a.attisdropped AND " |
|
|
|
" a.atttypid = 'pg_catalog.tsvector'::pg_catalog.regtype AND " |
|
|
|
" a.atttypid = 'pg_catalog.tsvector'::pg_catalog.regtype AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
/* exclude pg_catalog and pg_temp_ (could be orphaned tables) */ |
|
|
|
/* exclude possible orphaned temp tables */ |
|
|
|
" n.nspname !~ '^pg_' AND " |
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
" n.nspname != 'information_schema'"); |
|
|
|
" n.nspname !~ '^pg_toast_temp_' AND " |
|
|
|
|
|
|
|
" n.nspname NOT IN ('pg_catalog', 'information_schema')"); |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* This macro is used below to avoid reindexing indexes already rebuilt |
|
|
|
* This macro is used below to avoid reindexing indexes already rebuilt |
|
|
@ -619,9 +622,10 @@ old_8_3_create_sequence_script(ClusterInfo *cluster) |
|
|
|
" pg_catalog.pg_namespace n " |
|
|
|
" pg_catalog.pg_namespace n " |
|
|
|
"WHERE c.relkind = 'S' AND " |
|
|
|
"WHERE c.relkind = 'S' AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
/* exclude pg_catalog and pg_temp_ (could be orphaned tables) */ |
|
|
|
/* exclude possible orphaned temp tables */ |
|
|
|
" n.nspname !~ '^pg_' AND " |
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
" n.nspname != 'information_schema'"); |
|
|
|
" n.nspname !~ '^pg_toast_temp_' AND " |
|
|
|
|
|
|
|
" n.nspname NOT IN ('pg_catalog', 'information_schema')"); |
|
|
|
|
|
|
|
|
|
|
|
ntups = PQntuples(res); |
|
|
|
ntups = PQntuples(res); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
|
i_nspname = PQfnumber(res, "nspname"); |
|
|
|