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

Commit 43ea23a

Browse files
committed
More foreign table documentation improvements.
Shigeru Hanada, with some additional wordsmithing by me
1 parent 13000b4 commit 43ea23a

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/src/sgml/ddl.sgml

+5-4
Original file line numberDiff line numberDiff line change
@@ -3021,10 +3021,11 @@ ANALYZE measurement;
30213021
<firstterm>foreign data wrapper</firstterm>. A foreign data wrapper is a
30223022
library that can communicate with an external data source, hiding the
30233023
details of connecting to the data source and fetching data from it. There
3024-
are several foreign data wrappers available, which can for example read
3025-
plain data files residing on the server, or connect to another PostgreSQL
3026-
instance. If none of the existing foreign data wrappers suit your needs,
3027-
you can write your own; see <xref linkend="fdwhandler">.
3024+
is a foreign data wrapper available as a <file>contrib</file> module,
3025+
which can read plain data files residing on the server. Other kind of
3026+
foreign data wrappers might be found as third party products. If none of
3027+
the existing foreign data wrappers suit your needs, you can write your
3028+
own; see <xref linkend="fdwhandler">.
30283029
</para>
30293030

30303031
<para>

doc/src/sgml/fdwhandler.sgml

+11
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,17 @@ IterateForeignScan (ForeignScanState *node);
179179
are not needed, you should insert nulls in those column positions.
180180
</para>
181181

182+
<para>
183+
Note that <productname>PostgreSQL</productname>'s executor doesn't care
184+
whether the rows returned violate the <literal>NOT NULL</literal>
185+
constraints which were defined on the foreign table columns - but the
186+
planner does care, and may optimize queries incorrectly if
187+
<literal>NULL</> values are present in a column declared not to contain
188+
them. If a <literal>NULL</> value is encountered when the user has
189+
declared that none should be present, it may be appropriate to raise an
190+
error (just as you would need to do in the case of a data type mismatch).
191+
</para>
192+
182193
<para>
183194
<programlisting>
184195
void

0 commit comments

Comments
 (0)