Skip to content

Foreign data wrapper options

Generated from extension/src/options.rs and extension/src/import.rs. Edit those files and run make docs-generate; CI fails on an uncommitted difference.

These are every option the validator accepts. An option not listed for a statement is rejected at DDL time, naming the statement and the offending option, rather than being ignored.

CREATE SERVER

CREATE SERVER ... OPTIONS — how to reach a gateway.

Option Required Default Meaning
endpoint yes (none) gateway address as an https URL, e.g. https://axiom-gateway:8443; plaintext is refused because the connection carries cluster data
ca_cert no the host trust store path, readable by the Postgres server process, to the PEM CA bundle that signs the gateway certificate
rpc_timeout_secs no 30 per-RPC deadline in whole seconds, greater than zero; a whole-cluster IMPORT FOREIGN SCHEMA can need more than the default

CREATE FOREIGN TABLE

CREATE FOREIGN TABLE ... OPTIONS — which kind a table maps to.

Option Required Default Meaning
resource yes (none) plural resource name, e.g. pods; sufficient on its own for the built-in kinds
group no "" (the core API group) API group of the kind, e.g. apps or example.com
version no (none) API version, e.g. v1; required together with kind for any kind that is not built in
kind no (none) singular CamelCase kind, e.g. Widget; required together with version for any kind that is not built in
namespaced no true whether the kind is namespaced; false makes the namespace column meaningless and it is omitted from generated DDL
writable no false for built-in read-only kinds, true otherwise whether INSERT, UPDATE and DELETE are offered; cannot be turned on for kinds the extension keeps read-only, such as Pods
cache_mode no on_demand on_demand serves every scan by RPC; watch serves scans from the watch-driven cache and starts a subscription for the kind

CREATE FOREIGN TABLE (column ... OPTIONS)

A foreign table column's OPTIONS — which field it maps to.

Option Required Default Meaning
field no the top-level field whose name normalises to the column name exact name of the top-level field the column reads and writes, e.g. stringData; only for columns that map to a top-level field

IMPORT FOREIGN SCHEMA

IMPORT FOREIGN SCHEMA ... OPTIONS — how a whole schema is generated.

Option Required Default Meaning
cache_mode no on_demand applied to every generated table, and silently downgraded to on_demand for a kind the API server will not let the gateway watch
prefix no "" (no prefix) prepended to every generated table name, so two clusters can be imported into one schema without colliding

CREATE FOREIGN DATA WRAPPER and CREATE USER MAPPING

Neither accepts any option today, and both reject any that is given. The wrapper carries no configuration of its own, and per-caller credentials on a user mapping arrive in Phase 7 (see docs/AUTH.md).