Handling schema names starting with numeric during maintenance operation

posted Oct 22, 2014, 5:09 PM by Sachchida Ojha   [ updated Nov 3, 2014, 7:34 PM ]
The simplest solution of this problem to put your schema name in double quotes.  I have seen cases where there are tables with UPPER CASE. Your maintenance script will fail for that table if you do not include in double quotes. Here is the script that I use to pass ton VACUUM and ANALYZE command command/ ( non catalog tables).
The gadget spec URL could not be found
SELECT '"'||b.nspname ||'"'|| '.' ||'"'||relname||'"' FROM pg_class c,pg_namespace b WHERE c.relnamespace=b.oid and b.nspname NOT IN ('gp_toolkit', 'information_schema', 'pg_catalog') AND c.relkind='r'and c.relstorage!='x' ORDER BY b.nspname;
The gadget spec URL could not be found
cheers!
Comments