diff options
author | Michael Paquier <michael@paquier.xyz> | 2018-12-14 08:59:35 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2018-12-14 08:59:35 +0900 |
commit | 8fb569e978af3995f0dd6b0033758ec571aab0c1 (patch) | |
tree | cb1b57fc5c40825958912322da79c18836f31a66 /doc/src | |
parent | 09568ec3d31bbd4854b857e8d23c197ad5b25c77 (diff) |
Introduce new extended routines for FDW and foreign server lookups
The cache lookup routines for foreign-data wrappers and foreign servers
are extended with an extra argument to handle a set of flags. The only
value which can be used now is to indicate if a missing object should
result in an error or not, and are designed to be extensible on need.
Those new routines are added into the existing set of user-visible
FDW APIs and documented in consequence. They will be used for future
patches to improve the SQL interface for object addresses.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/CAB7nPqSZxrSmdHK-rny7z8mi=EAFXJ5J-0RbzDw6aus=wB5azQ@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/fdwhandler.sgml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index 4ce88dd77c1..452b776b9e1 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -1408,6 +1408,23 @@ ReparameterizeForeignPathByChild(PlannerInfo *root, List *fdw_private, <para> <programlisting> ForeignDataWrapper * +GetForeignDataWrapperExtended(Oid fdwid, bits16 flags); +</programlisting> + + This function returns a <structname>ForeignDataWrapper</structname> + object for the foreign-data wrapper with the given OID. A + <structname>ForeignDataWrapper</structname> object contains properties + of the FDW (see <filename>foreign/foreign.h</filename> for details). + <structfield>flags</structfield> is a bitwise-or'd bit mask indicating + an extra set of options. It can take the value + <literal>FDW_MISSING_OK</literal>, in which case a <literal>NULL</literal> + result is returned to the caller instead of an error for an undefined + object. + </para> + + <para> +<programlisting> +ForeignDataWrapper * GetForeignDataWrapper(Oid fdwid); </programlisting> @@ -1420,6 +1437,23 @@ GetForeignDataWrapper(Oid fdwid); <para> <programlisting> ForeignServer * +GetForeignServerExtended(Oid serverid, bits16 flags); +</programlisting> + + This function returns a <structname>ForeignServer</structname> object + for the foreign server with the given OID. A + <structname>ForeignServer</structname> object contains properties + of the server (see <filename>foreign/foreign.h</filename> for details). + <structfield>flags</structfield> is a bitwise-or'd bit mask indicating + an extra set of options. It can take the value + <literal>FSV_MISSING_OK</literal>, in which case a <literal>NULL</literal> + result is returned to the caller instead of an error for an undefined + object. + </para> + + <para> +<programlisting> +ForeignServer * GetForeignServer(Oid serverid); </programlisting> |