mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Various doc updates.
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
***************************
|
||||
Foreign Data Wrapper Dialog
|
||||
***************************
|
||||
.. _fdw:
|
||||
|
||||
Use the *Foreign Data Wrapper* dialog to create a foreign data wrapper. The foreign data wrapper consists of a set of functions; all operations on a foreign table are handled through the foreign data wrapper. The foreign data wrapper is responsible for fetching data from the remote data source and returning it to the PostgreSQL executor.
|
||||
*******************************
|
||||
The Foreign Data Wrapper Dialog
|
||||
*******************************
|
||||
|
||||
A foreign-data wrapper name must be unique within the database. You must be a superuser to create a foreign-data wrapper.
|
||||
Use the *Foreign Data Wrapper* dialog to create a foreign data wrapper. A foreign data wrapper is an adapter between a Postgres database and data stored on another data source.
|
||||
|
||||
The *Foreign Data Wrapper* dialog allows you to implement options of the CREATE FOREIGN DATA WRAPPER command. For more information about the CREATE FOREIGN DATA WRAPPER command, see PostgreSQL core documentation available at:
|
||||
You must be a superuser to create a foreign data wrapper.
|
||||
|
||||
http://www.postgresql.org/docs/9.5/static/sql-createforeigndatawrapper.html
|
||||
|
||||
The *Foreign Data Wrapper* dialog organizes the development of a foreign data wrapper through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Foreign Data Wrapper* dialog organizes the development of a foreign data wrapper through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/foreign_data_wrapper_general.png
|
||||
|
||||
Use the fields in the *General* tab to identify the foreign data wrapper:
|
||||
Use the fields in the *General* tab to identify the foreign data wrapper:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the foreign data wrapper. The name will be displayed in the *Object browser* tree control.
|
||||
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign data wrapper.
|
||||
* Store notes about the foreign data wrapper in the *Comments* field.
|
||||
* Use the *Name* field to add a descriptive name for the foreign data wrapper. A foreign data wrapper name must be unique within the database. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign data wrapper.
|
||||
* Store notes about the foreign data wrapper in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
@@ -27,7 +25,7 @@ Click the *Definition* tab to continue.
|
||||
Use the fields in the *Definition* tab to set parameters:
|
||||
|
||||
* Select the name of the handler from the drop-down listbox in the *Handler* field. This is the name of an existing function that will be called to retrieve the execution functions for foreign tables.
|
||||
* Select the name of the validator from the drop-down listbox in the *Validator* field. This is the name of an existing function that will be called to check the generic options given to the foreign-data wrapper, as well as options for foreign servers, user mappings and foreign tables using the foreign-data wrapper.
|
||||
* Select the name of the validator from the drop-down listbox in the *Validator* field. This is the name of an existing function that will be called to check the generic options given to the foreign data wrapper, as well as options for foreign servers, user mappings and foreign tables using the foreign data wrapper.
|
||||
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
@@ -50,24 +48,23 @@ Use the *Security* tab to assign security privileges. Click *Add* to assign a se
|
||||
* Click inside the *Privileges* field. Check the boxes to the left of one or more privileges to grant the selected privileges to the specified user.
|
||||
* Select the name of the role granting the privileges from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the foreign data wrapper.
|
||||
|
||||
To discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
Click add to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Foreign Data Wrapper* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Data Wrapper* dialog:
|
||||
|
||||
.. image:: images/foreign_data_wrapper_sql.png
|
||||
|
||||
Your entries in the *Foreign Data Wrapper* dialog generate a SQL command; you can review the command on the *SQL* pane.
|
||||
The example creates a foreign data wrapper named *libpq_debug* that uses pre-existing validator and handler functions, *dblink_fdw_validator* and *libpg_fdw_handler*. Selections on the *Options* tab set *debug* equal to *true*. The foreign data wrapper is owned by *enterprisedb*.
|
||||
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Help* button (?) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to restore configuration parameters.
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Data Wrapper dialog*:
|
||||
|
||||
.. image:: images/foreign_data_wrapper_sql_example.png
|
||||
|
||||
The example creates a foreign data wrapper named *libpq_debug* that uses pre-existing validator and handler functions, *dblink_fdw_validator* and *libpg_fdw_handler*. Selections on the *Options* tab set *debug* equal to *true*. The foreign data wrapper is owned by *enterprisedb*.
|
||||
|
Reference in New Issue
Block a user