3.20. Foreign tables
Foreign tables, like tables, are containers that store several kinds of other objects, like columns, constraints, and triggers. The substantial difference between tables and foreign tables is that the latter retrieve their data using a foreign server, which is attached to a foreign data wrapper. All child objects of a foreign table are configured in the same way as the table's child objects, so refer to their respective documentation pages for more details. The other attributes of the foreign table are detailed below:
1234
| General | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | Server | Options | The foreign server the foreign table is retrieved from. |
| 2 | Tag | Options | This attribute is used to configure the tag object associated with the table. Tags are used to visually separate tables and views, even if they belong to the same schema. Details about tags can be seen further in this chapter in the section Tags. |
| 3 | Generate ALTER for columns / constraints | Options | When checked, all the columns and constraints are generated as |
| 4 | Edit data | Define initial data for the table | |
1
| Columns | ||
|---|---|---|
| # | Field | Description |
| 1 | Columns | The columns of the object (primary key mark, name, type, default value, attributes, alias, and comment). Use the buttons beside the list to add |
1
| Constraints | ||
|---|---|---|
| # | Field | Description |
| 1 | Constraints | The constraints of the table (name, type, |
1
| Triggers | ||
|---|---|---|
| # | Field | Description |
| 1 | Triggers | The triggers of the object (name, referenced table, firing time, events, alias, and comment). Use the buttons beside the list ( |
1
| Tables | ||
|---|---|---|
| # | Field | Description |
| 1 | Ancestor tables | The ancestors of the foreign table, that is, the tables linked to it through a generalization relationship. Refer to the section Relationships for details. |
1
| Options | ||
|---|---|---|
| # | Field | Description |
| 1 | Options | The options associated with the foreign table or one of its columns. The allowed option names and values are specific to each foreign data wrapper and are validated by its validator function. |
References
Foreign table DDL
https://www.postgresql.org/docs/current/sql-createforeigntable.html