...
Code Block | ||||
---|---|---|---|---|
| ||||
select 'truncate table my_schema.' || tablename || ';' as generated_statements from pg_catalog.pg_tables where schemaname = 'my_schema' /* set this to your data location schema */ and tablename not like 'dl_%' /* do not truncate these system tables */ and tablename not like 'ext_%' /* do not truncate these system tables */ and tablename likeilike '%entityname' /* edit these filters as needed */ order by substr(tablename,3), tablename; |
...