ALTER FOREIGN DATA WRAPPER

Modify the definition of an external data wrapper.

Summary

ALTER FOREIGN DATA WRAPPER name
    [ HANDLER handler_function | NO HANDLER ]
    [ VALIDATOR validator_function | NO VALIDATOR ]
    [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) ]

ALTER FOREIGN DATA WRAPPER name OWNER TO new_owner
ALTER FOREIGN DATA WRAPPER name RENAME TO new_name

describe

ALTER FOREIGN DATA WRAPPER Modify the definition of an external data wrapper. The first statement modifys the support function of the external data wrapper or a general option. YMatrix database requires only one option. The second and third statements modify the owner or name of the external data package.

Only superusers can modify external data packaging. In addition, only superusers can have external data packaging.

Parameters

name

  • Name of external data packaging.

HANDLER handler_function

  • Provide a new processing function for external data wrappers.

NO HANDLER

  • Specifies that the external data wrapper no longer has processing functions.

VALIDATOR validator_function

  • Provide a new verification function for external data wrappers.
  • When you modify the verification function, external data wrappers, servers, and user maps may become unavailable. You must make sure these options are correct before modifying external data wrappers. Note When using a new validator, the YMatrix database checks for all options used in the ALTER FOREIGN DATA WRAPPER command.

NO VALIDATOR

  • Specifies that the external data wrapper no longer has a validation function.

OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )

  • Options to modify external data wrappers. ADD, SET, and DROP specify the action of the action. If the operation is not specified, the default operation is ADD. The name of the option must be unique. If a verification function is used, YMatrix verifies the provided option name and value.

OWNER TO new_owner

  • Specifies the new owner of the external data wrapper, only superusers can own the external data wrapper.

RENAME TO new_name

  • Specify the new name of the external data wrapper.

Example

Modify the definition of the external data wrapper named dbi, add a new option foo, and then remove the option named bar:

ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');

Modify the verification function named dbi to bob.myvalidator:

ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;

compatibility

ALTER FOREIGN DATA WRAPPER is adapted to ISO/IEC 9075-9 (SQL/MED), but the HANDLER, VALIDATOR, OWNER TO, and RENAME TO options are extensions to the YMatrix database.

See also

CREATE FOREIGN DATA WRAPPER , DROP FOREIGN DATA WRAPPER