BUG #18836: Cannot import foreign schema under different schema name when foreign table uses row types
| От | PG Bug reporting form |
|---|---|
| Тема | BUG #18836: Cannot import foreign schema under different schema name when foreign table uses row types |
| Дата | |
| Msg-id | 18836-070c3c12d36a1331@postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #18836: Cannot import foreign schema under different schema name when foreign table uses row types
|
| Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18836 Logged by: Marcin Wisnicki Email address: mwisnicki@gmail.com PostgreSQL version: 16.8 Operating system: Linux Description: Assume foreign public schema has tables that use row types from the same schema, e.g. CREATE TABLE public.foo(); CREATE TABLE public.bar(foo public.foo); If I try to import such schema under different local schema: CREATE SCHEMA server1_foreign; IMPORT FOREIGN SCHEMA public FROM SERVER server1 INTO server1_foreign; Then such import will fail due to mismatched schema of rowtype: > [42704] ERROR: type "public.foo" does not exist > Where: importing foreign table "bar" Since postgres knows it's importing public into server1_foreign it should do the mapping on rowtypes within same schema. Ideally there should also be an option to customize mapping of custom types but the above IMHO should work out of the box. I'm aware I can workaround the problem by importing all tables manually with CREATE FOREIGN TABLE.
В списке pgsql-bugs по дате отправления: