Query: create_foreign_data_wrapper
OS: suse
Section: 7
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CREATE FOREIGN DATAWRAPPER(7) SQL Commands CREATE FOREIGN DATA WRAPPER(7)NAMECREATE FOREIGN DATA WRAPPER - define a new foreign-data wrapperSYNOPSISCREATE FOREIGN DATA WRAPPER name [ VALIDATOR valfunction | NO VALIDATOR ] [ OPTIONS ( option 'value' [, ... ] ) ]DESCRIPTIONCREATE FOREIGN DATA WRAPPER creates a new foreign-data wrapper. The user who defines a foreign-data wrapper becomes its owner. The foreign-data wrapper name must be unique within the database. Only superusers can create foreign-data wrappers.PARAMETERSname The name of the foreign-data wrapper to be created. VALIDATOR valfunction valfunction is the name of a previously registered function that will be called to check the generic options given to the foreign- data wrapper, as well as to foreign servers and user mappings using the foreign-data wrapper. If no validator function or NO VALIDA- TOR is specified, then options will not be checked at creation time. (Foreign-data wrappers will possibly ignore or reject invalid option specifications at run time, depending on the implementation.) The validator function must take two arguments: one of type text[], which will contain the array of options as stored in the system catalogs, and one of type oid, which will be the OID of the system catalog containing the options. The return type is ignored; the function should indicate invalid options using the ereport() function. OPTIONS ( option 'value' [, ... ] ) This clause specifies options for the new foreign-data wrapper. The allowed option names and values are specific to each foreign data wrapper and are validated using the foreign-data wrapper library. Option names must be unique.NOTESAt the moment, the foreign-data wrapper functionality is very rudimentary. The purpose of foreign-data wrappers, foreign servers, and user mappings is to store this information in a standard way so that it can be queried by interested applications. One such application is dblink; see in the documentation. The functionality to actually query external data through a foreign-data wrapper library does not exist yet. There is currently one foreign-data wrapper validator function provided: postgresql_fdw_validator, which accepts options corresponding to libpq connection parameters.EXAMPLESCreate a foreign-data wrapper dummy: CREATE FOREIGN DATA WRAPPER dummy; Create a foreign-data wrapper postgresql with validator function postgresql_fdw_validator: CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator; Create a foreign-data wrapper mywrapper with some options: CREATE FOREIGN DATA WRAPPER mywrapper OPTIONS (debug 'true');COMPATIBILITYCREATE FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), with the exception that the VALIDATOR clause is an extension and the clauses LIBRARY and LANGUAGE are not yet implemented in PostgreSQL. Note, however, that the SQL/MED functionality as a whole is not yet conforming.SEE ALSOALTER FOREIGN DATA WRAPPER [alter_foreign_data_wrapper(7)], DROP FOREIGN DATA WRAPPER [drop_foreign_data_wrapper(7)], CREATE SERVER [cre- ate_server(7)], CREATE USER MAPPING [create_user_mapping(7)] SQL - Language Statements 2010-05-14 CREATE FOREIGN DATA WRAPPER(7)
Related Man Pages |
---|
alter_server(7) - centos |
create_foreign_data_wrapper(7) - centos |
alter_foreign_data_wrapper(7) - suse |
alter_user_mapping(7) - suse |
create_foreign_data_wrapper(7) - suse |
Similar Topics in the Unix Linux Community |
---|
Ftp Download Problem |
foreign characters in flat file |
splitting the file |
Created a wrapper for a function in a class. |
Convert rows to columns |