1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
*****
Usage
*****
The multicorn foreign data wrapper is not different from other foreign data
wrappers.
To use it, you have to:
- Create the extension in the target database.
As a PostgreSQL super user, run the following SQL:
.. code-block:: sql
CREATE EXTENSION multicorn;
- Create a server.
In the SQL ``OPTIONS`` clause, you must provide an options named wrapper,
containing the fully-qualified class name of the concrete python foreign data
wrapper you want to use:
.. code-block:: sql
CREATE SERVER multicorn_imap FOREIGN DATA WRAPPER multicorn
options (
wrapper 'multicorn.imapfdw.ImapFdw'
);
You can then proceed on with the actual foreign tables creation, and pass them
the needed options.
Each foreign data wrapper supports its own set of options, and may interpret the
columns definitions differently.
You should look at the documentation for the specific :doc:`Foreign Data Wraper documentation <foreign-data-wrappers>`
|