This projects aims to provide a YAML specification for Postgres foreign data wrappers (FDW) configuration.
Specification consists of the general information and FDW implementation sections.
Common information includes:
name: FDW nameversion: FDW versionsource: official FDW repository/documentation URL
name: <fdw_name>
version: <fdw_version>
source: <official_repo_url>
<fdw_template>Where <fdw_template> is a FDW implementation template.
FDW implementation template consists of the following sections:
foreign_serveruser_mappingimport_foreign_schemacreate_foreign_tableforeign_table_column
Only foreign_server section is required.
In a sense that you must create a foreign server to be able to use the FDW.
All other sections are optional and subject to the specific FDW implementation.
Each section can have zero, one or set of options that can be used to configure the FDW.
Note:
If
foreign_serversection has no options as per FDW implementation, it turns it into an optional section. In this case, it can be ommited from the configuration file.
Option itself has a name denoted by option key and a set of properties.
All properties are optional. If not provided, they are considered as null.
required:true|false|conditional. Flag, whether the option is required or not.default: default value, if anydata_type: data type of the optiondescription: description of the option
foreign_server:
[<option>
...
<option>]
user_mapping:
[<option>
...
<option>]
import_foreign_schema:
[<option>
...
<option>]
create_foreign_table:
[<option>
...
<option>]
foreign_table_column:
[<option>
...
<option>]
<option> =
option:
required: true | false | conditional
default:
data_type:
description:Each FDW has a dedicated folder. Within it, there are files per specific FDW version.