From 311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 16 Apr 2024 21:46:48 +0200 Subject: Adding upstream version 15.4. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/fdw-functions.html | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/src/sgml/html/fdw-functions.html (limited to 'doc/src/sgml/html/fdw-functions.html') diff --git a/doc/src/sgml/html/fdw-functions.html b/doc/src/sgml/html/fdw-functions.html new file mode 100644 index 0000000..fe0719c --- /dev/null +++ b/doc/src/sgml/html/fdw-functions.html @@ -0,0 +1,36 @@ + +59.1. Foreign Data Wrapper Functions

59.1. Foreign Data Wrapper Functions

+ The FDW author needs to implement a handler function, and optionally + a validator function. Both functions must be written in a compiled + language such as C, using the version-1 interface. + For details on C language calling conventions and dynamic loading, + see Section 38.10. +

+ The handler function simply returns a struct of function pointers to + callback functions that will be called by the planner, executor, and + various maintenance commands. + Most of the effort in writing an FDW is in implementing these callback + functions. + The handler function must be registered with + PostgreSQL as taking no arguments and + returning the special pseudo-type fdw_handler. The + callback functions are plain C functions and are not visible or + callable at the SQL level. The callback functions are described in + Section 59.2. +

+ The validator function is responsible for validating options given in + CREATE and ALTER commands for its + foreign data wrapper, as well as foreign servers, user mappings, and + foreign tables using the wrapper. + The validator function must be registered as taking two arguments, a + text array containing the options to be validated, and an OID + representing the type of object the options are associated with (in + the form of the OID of the system catalog the object would be stored + in, either + ForeignDataWrapperRelationId, + ForeignServerRelationId, + UserMappingRelationId, + or ForeignTableRelationId). + If no validator function is supplied, options are not checked at object + creation time or object alteration time. +

\ No newline at end of file -- cgit v1.2.3