代码之家  ›  专栏  ›  技术社区  ›  ZK Zhao

PostgreSQL-创建外部表时如何导入自定义数据类型(使用postgres fdw)?

  •  0
  • ZK Zhao  · 技术社区  · 5 年前

    postgresql_fdw https://www.postgresql.org/docs/current/postgres-fdw.html ).

    当你试图 IMPORT FOREIGN SCHEMA public FROM SERVER replica_db1 INTO db1 ,据报道

    type "public.custom_type" does not exist

    https://www.postgresql.org/docs/current/postgres-fdw.html

    我想知道,我如何能自动复制自定义数据类型到目标数据库?

    谢谢!

    0 回复  |  直到 5 年前
        1
  •  2
  •   Laurenz Albe    5 年前

    The documentation 告诉你:

    如果您希望将该类型上的函数和运算符向下推,则必须将它们放入 extension 安装在两个数据库中。

    extension 外部服务器的选项。

    推荐文章