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: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal to CREATE FOREIGN TABLE LIKE
Date: 2025-02-06 10:29:18
Message-ID: 202502061029.s5sdtrnpfm7u@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Feb-06, Zhang Mingli wrote:

> Added support for CREATE FOREIGN TABLE LIKE to enable the creation of
> foreign tables based on the column definitions, constraints of
> existing source tables.
> This feature mirrors the behavior of CREATE TABLE LIKE, but ignores
> inapplicable options such as INCLUDING INDEXES and INCLUDING
> COMPRESSION for foreign tables.

I think it'd be better to throw errors if they are given -- but
INCLUDING ALL should be made to work in a different way than today so
that it doesn't raise errors uselessly. Right now it works by setting
all the bits in the value, um.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-02-06 10:31:43 Re: Proposal to CREATE FOREIGN TABLE LIKE
Previous Message Bertrand Drouvot 2025-02-06 10:28:48 Re: per backend WAL statistics