Re: Proposal to CREATE FOREIGN TABLE LIKE

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal to CREATE FOREIGN TABLE LIKE
Date: 2025-02-01 12:20:17
Message-ID: 202502011220.zky22md42obm@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Feb-01, Zhang Mingli wrote:

> Our DBA team uses foreign tables for ETL processes in Greenplum and Cloudberry,
> and we often need to create foreign tables that match the column definitions of local tables.
>
> When dealing with wide tables and lots of those foreign tables, it can get pretty tedious and mistakes happen easily.

Sure. Did you consider IMPORT FOREIGN SCHEMA?

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
[…] indem ich in meinem Leben oft an euch gedacht, euch glücklich zu machen. Seyd es!
A menudo he pensado en vosotros, en haceros felices. ¡Sedlo, pues!
Heiligenstädter Testament, L. v. Beethoven, 1802
https://de.wikisource.org/wiki/Heiligenstädter_Testament

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2025-02-01 13:39:10 Re: Proposal to CREATE FOREIGN TABLE LIKE
Previous Message Dmitry Koterov 2025-02-01 11:46:33 Re: hash_search_with_hash_value is high in "perf top" on a replica