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

Commit 348f57c

Browse files
committed
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>
1 parent 119dcfa commit 348f57c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/src/sgml/ref/create_foreign_table.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,16 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
350350
reality.
351351
</para>
352352

353+
<para>
354+
Similar considerations apply to generated columns. Stored generated
355+
columns are computed on insert or update on the local
356+
<productname>PostgreSQL</productname> server and handed to the
357+
foreign-data wrapper for writing out to the foreign data store, but it is
358+
not enforced that a query of the foreign table returns values for stored
359+
generated columns that are consistent with the generation expression.
360+
Again, this might result in incorrect query results.
361+
</para>
362+
353363
<para>
354364
While rows can be moved from local partitions to a foreign-table partition
355365
(provided the foreign data wrapper supports tuple routing), they cannot be

0 commit comments

Comments
 (0)