Adds test for COPY FROM failure in Citus foreign tables (#7160)

pull/7166/head
Naisila Puka 2023-09-01 12:20:07 +03:00 committed by GitHub
parent b8bded6454
commit 05443a77ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,9 @@ SELECT partmethod, repmodel FROM pg_dist_partition WHERE logicalrelid = 'foreign
n | s
(1 row)
-- COPY FROM doesn't work for Citus foreign tables
COPY foreign_table FROM stdin;
ERROR: cannot PREPARE a transaction that has operated on postgres_fdw foreign tables
CREATE TABLE parent_for_foreign_tables (
project_id integer
) PARTITION BY HASH (project_id);

View File

@ -37,6 +37,11 @@ CREATE FOREIGN TABLE foreign_table (
--verify
SELECT partmethod, repmodel FROM pg_dist_partition WHERE logicalrelid = 'foreign_table'::regclass ORDER BY logicalrelid;
-- COPY FROM doesn't work for Citus foreign tables
COPY foreign_table FROM stdin;
1 1foo 2
\.
CREATE TABLE parent_for_foreign_tables (
project_id integer
) PARTITION BY HASH (project_id);