aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-04-08 13:47:46 +0200
committerPeter Eisentraut <peter@eisentraut.org>2019-04-08 13:47:46 +0200
commit348f57ce5be96190491e2153abb47060884f8ebf (patch)
tree85d669010ec9bfec3f0cb4b8efb9df52f8fa9b10
parent119dcfad988d5b5d9f52b256087869997670aa36 (diff)
downloadpostgresql-348f57ce5be96190491e2153abb47060884f8ebf.tar.gz
postgresql-348f57ce5be96190491e2153abb47060884f8ebf.zip
doc: Add note about generated columns in foreign tables
Explain that it is not enforced that querying a generated column returns data that is consistent with the data that was stored. This is similar to the note about constraints nearby. Reported-by: Amit Langote <amitlangote09@gmail.com>
-rw-r--r--doc/src/sgml/ref/create_foreign_table.sgml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml
index 6b15726517e..5db15eb73eb 100644
--- a/doc/src/sgml/ref/create_foreign_table.sgml
+++ b/doc/src/sgml/ref/create_foreign_table.sgml
@@ -351,6 +351,16 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
</para>
<para>
+ Similar considerations apply to generated columns. Stored generated
+ columns are computed on insert or update on the local
+ <productname>PostgreSQL</productname> server and handed to the
+ foreign-data wrapper for writing out to the foreign data store, but it is
+ not enforced that a query of the foreign table returns values for stored
+ generated columns that are consistent with the generation expression.
+ Again, this might result in incorrect query results.
+ </para>
+
+ <para>
While rows can be moved from local partitions to a foreign-table partition
(provided the foreign data wrapper supports tuple routing), they cannot be
moved from a foreign-table partition to another partition.