Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5f36096

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 0dab5ef commit 5f36096

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
@@ -2892,7 +2892,11 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
28922892

28932893
/*
28942894
* Fetch all table data from this schema, possibly restricted by
2895-
* EXCEPT or LIMIT TO.
2895+
* EXCEPT or LIMIT TO. (We don't actually need to pay any attention
2896+
* to EXCEPT/LIMIT TO here, because the core code will filter the
2897+
* statements we return according to those lists anyway. But it
2898+
* should save a few cycles to not process excluded tables in the
2899+
* first place.)
28962900
*
28972901
* Note: because we run the connection with search_path restricted to
28982902
* pg_catalog, the format_type() and pg_get_expr() outputs will always

0 commit comments

Comments
 (0)