Finding Bad table name in Greenplum

Post date: May 27, 2022 6:58:5 PM

Due to some bug in the older version of greenplum some of table contains (-) or (.) in the name.  You can find all those tables names with following SQL.

select relname from pg_class where relname !~ '^[_a-zA-Z0-9]*$';