Re: Proposal to CREATE FOREIGN TABLE LIKE
| От | Zhang Mingli |
|---|---|
| Тема | Re: Proposal to CREATE FOREIGN TABLE LIKE |
| Дата | |
| Msg-id | db68bd6f-6085-4152-8799-82ac929b256d@Spark обсуждение исходный текст |
| Ответ на | Re: Proposal to CREATE FOREIGN TABLE LIKE (Álvaro Herrera <alvherre@alvh.no-ip.org>) |
| Список | pgsql-hackers |
www.hashdata.xyz
On Feb 1, 2025 at 20:20 +0800, Álvaro Herrera <alvherre@alvh.no-ip.org>, wrote:
Sure. Did you consider IMPORT FOREIGN SCHEMA?
Hi, Álvaro
Thank you very much for your suggestion.
I've looked into it, and it certainly can be beneficial, especially for
However, I believe that not all FDWs support the concept of a schema or can be used with the
For example, we use
In our scenario, we sometimes need to write records from a local table into Kafka. Here’s a brief outline of our process:
Thank you very much for your suggestion.
I've looked into it, and it certainly can be beneficial, especially for
postgres_fdw.However, I believe that not all FDWs support the concept of a schema or can be used with the
IMPORT FOREIGN SCHEMA command, is it?For example, we use
kafka_fdw to produce and consume data from a Kafka server.In our scenario, we sometimes need to write records from a local table into Kafka. Here’s a brief outline of our process:
- We already have a wide table,
local_wide_tablein Postgres. - We need to create a foreign table,
foreign_table, with the same definition aslocal_wide_table. - Insert records into
foreign_tableby selecting fromlocal_wide_tablewith the some quals.
In step 2, we currently have to manually create the foreign table using
CREATE FOREIGN TABLE and copy the column definitions one by one.В списке pgsql-hackers по дате отправления: