Hi,
Zhang Mingli www.hashdata.xyz On Feb 4, 2025 at 04:18 +0800, Sami Imseih <samims...@gmail.com>, wrote: > > This really does not make sense as this > optimization cannot be applied to a remote table and it > can give a user a false impression that it was. +1, ``` + /* + * Raise an error on foreign tables as it's not possible to apply + * the COPY FREEZE optimization to a remote relation. + */ + if (cstate->rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE) + { + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot perform COPY FREEZE on a foreign table"))); + } + ``` Instead of throwing an error, how about we turn that into a warning? This way, if someone is batch-importing data for multiple tables, it won’t interrupt their script that generates a COPY for each table. Is it better to give them a heads-up without making them modify their commands right away?