Re: Proposal to CREATE FOREIGN TABLE LIKE - Mailing list pgsql-hackers

From Zhang Mingli
Subject Re: Proposal to CREATE FOREIGN TABLE LIKE
Date
Msg-id 0663eec9-883d-4c25-ade4-58f227ece827@Spark
Whole thread Raw
In response to Re: Proposal to CREATE FOREIGN TABLE LIKE  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Feb 6, 2025 at 18:31 +0800, Álvaro Herrera <alvherre@alvh.no-ip.org>, wrote:

Ah, but our fine manual already says

The LIKE clause can also be used to copy column definitions from views,
foreign tables, or composite types. Inapplicable options (e.g.,
INCLUDING INDEXES from a view) are ignored.

so what you implemented seems to be okay from that POV.
Hi, Yeah,

Our current convention is to ignore any inapplicable options without throwing errors.

As you mentioned, we use bits to identify the options, which does add some complexity to the codes if we try to track the origin of the option bits.

--
Zhang Mingli
HashData

pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Remove useless casts to (char *)
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: new commitfest transition guidance