How to drop multiple tables in PostgreSQL using a wildcard

前端 未结 7 1996
闹比i
闹比i 2020-12-13 05:39

When working with partitions, there is often a need to delete all partitions at once.

However

DROP TABLE tablename*

Does not work.

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 05:52

    So I faced this problem today. I loaded my server db through pgadmin3 and did it that way. Tables are sorted alphabetically so shift and click followed by delete works well.

提交回复
热议问题