From: Robert Haas Date: Mon, 13 Jun 2011 12:28:41 +0000 (-0400) Subject: More foreign table documentation improvements. X-Git-Tag: REL9_1_BETA3~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16d64a8773c6c381c55d678855f29953184693f7;p=postgresql More foreign table documentation improvements. Shigeru Hanada, with some additional wordsmithing by me --- diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 9709dd613f..09d7a24a25 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -3021,10 +3021,11 @@ ANALYZE measurement; foreign data wrapper. A foreign data wrapper is a library that can communicate with an external data source, hiding the details of connecting to the data source and fetching data from it. There - are several foreign data wrappers available, which can for example read - plain data files residing on the server, or connect to another PostgreSQL - instance. If none of the existing foreign data wrappers suit your needs, - you can write your own; see . + is a foreign data wrapper available as a contrib module, + which can read plain data files residing on the server. Other kind of + foreign data wrappers might be found as third party products. If none of + the existing foreign data wrappers suit your needs, you can write your + own; see . diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index fc07f129b7..c8ae861852 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -179,6 +179,17 @@ IterateForeignScan (ForeignScanState *node); are not needed, you should insert nulls in those column positions. + + Note that PostgreSQL's executor doesn't care + whether the rows returned violate the NOT NULL + constraints which were defined on the foreign table columns - but the + planner does care, and may optimize queries incorrectly if + NULL values are present in a column declared not to contain + them. If a NULL value is encountered when the user has + declared that none should be present, it may be appropriate to raise an + error (just as you would need to do in the case of a data type mismatch). + + void