我使用以下命令从服务器的数据库中转储一些结构,以便能够在我的本地硬盘驱动器上创建数据样本。
pg_dump -h myserver.com -U product_user -s -f ./data/base.structure.postgresql.sql -F p -v -T public.* -T first_product.* -T second_product.* -T another_product.locales mydatabase
我需要排除一些模式,否则最终会出现权限或其他错误。即使我排除了公开模式,它也会转储该模式中的所有函数,如下所示:
REVOKE ALL ON FUNCTION gin_extract_trgm(text, internal) FROM PUBLIC;
psql:./data/base.structure.postgresql.sql:8482: ERROR: function gin_extract_trgm(text, internal) does not exist
我知道这来自 PostgreSQL 中的全文或相似插件,但我不使用它,也不需要在我的机器上使用它,所以我想排除这些功能。
我怎么能那样做?