Skip to content

Commit 69892d5

Browse files
committed
Add a comment noting that FDWs don't have to implement EXCEPT or LIMIT TO.
postgresImportForeignSchema pays attention to IMPORT's EXCEPT and LIMIT TO options, but only as an efficiency hack, not for correctness' sake. The FDW documentation does explain that, but someone using postgres_fdw.c as a coding guide might not remember it, so let's add a comment here. Per question from Regina Obe.
1 parent 30858be commit 69892d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,11 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
26752675

26762676
/*
26772677
* Fetch all table data from this schema, possibly restricted by
2678-
* EXCEPT or LIMIT TO.
2678+
* EXCEPT or LIMIT TO. (We don't actually need to pay any attention
2679+
* to EXCEPT/LIMIT TO here, because the core code will filter the
2680+
* statements we return according to those lists anyway. But it
2681+
* should save a few cycles to not process excluded tables in the
2682+
* first place.)
26792683
*
26802684
* Note: because we run the connection with search_path restricted to
26812685
* pg_catalog, the format_type() and pg_get_expr() outputs will always

0 commit comments

Comments
 (0)