Files
openGauss-OM/script/gspylib/inspection/lib/checkblacklist/GetTableUseToGroup.sql
hangjin2020 a2679f0cf7 om仓迁移
2020-12-16 17:25:24 +08:00

16 lines
349 B
SQL

with oid2relname AS
(
SELECT
n.nspname AS schemaname,
c.relname AS tablename,
c.oid AS relid
FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
)
select
schemaname,
tablename,
pgroup as nodegroup
from pgxc_class
inner join oid2relname on (relid = pcrelid)
where pgroup in (select group_name from pgxc_group offset 1);