我有一个自定义类型的数据库,无法使用IMPORT FOREIGN SCHEMA public FROM SERVER replica_db1 INTO db1
因为CREATE FOREIGN TABLE
失败导入。如何导入自定义类型?此外,自定义类型是从公共架构中引用的,如何将其更改为使用本地服务器的架构?
reporting=> IMPORT FOREIGN SCHEMA public FROM SERVER replica_db1 INTO db1;
ERROR: type "public.custom_type" does not exist
LINE 8: start public.custom_type OPTIONS (column_name 'start'),
^
QUERY: CREATE FOREIGN TABLE table1 (
id bigint OPTIONS (column_name 'id') NOT NULL,
start public.custom_type OPTIONS (column_name 'start'),
"end" public.custom_type OPTIONS (column_name 'end')
) SERVER replica_db1
OPTIONS (schema_name 'public', table_name 'table1');
CONTEXT: importing foreign table "table1"
reporting=> IMPORT FOREIGN TYPE public FROM SERVER replica_db1 INTO db1;
ERROR: syntax error at or near "TYPE"
LINE 1: IMPORT FOREIGN TYPE public FROM SERVER replica_db1 INT...
谢谢