Thread: pgsql: Disallow COPY FREEZE on foreign tables.

pgsql: Disallow COPY FREEZE on foreign tables.

From
Nathan Bossart
Date:
Disallow COPY FREEZE on foreign tables.

This didn't actually work: the COPY succeeds, but the FREEZE
optimization isn't applied.  There doesn't seem to be an easy way
to support FREEZE on foreign tables, so let's follow the precedent
established by commit 5c9a5513a3 by raising an error early.  This
is arguably a bug fix, but due to the lack of reports, the minimal
discussion on the mailing list, and the potential to break existing
scripts, I am not back-patching it for now.

Author: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Zhang Mingli <zmlpostgres@gmail.com>
Discussion: https://postgr.es/m/CAA5RZ0ujeNgKpE3OrLtR%3DeJGa5LkGMekFzQTwjgw%3DrzaLufQLQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/401a6956fa69c9202cbc14c09ba8a9c430b90cac

Modified Files
--------------
doc/src/sgml/ref/copy.sgml         |  2 +-
src/backend/commands/copyfrom.c    |  6 ++++++
src/test/regress/expected/copy.out |  8 ++++++++
src/test/regress/sql/copy.sql      | 10 ++++++++++
4 files changed, 25 insertions(+), 1 deletion(-)