Skip to content

grpc_fdw

Foreign data wrapper that delegates table operations to services over gRPC.

grpc_fdw · Foreign data wrapper that delegates table operations to services over gRPC.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101391grpc_fdwgrpc_fdw1.0FDWUnknownRust

Usage

Sources:

grpc_fdw — Foreign data wrapper that delegates table operations to services over gRPC. Use it when PostgreSQL must access the corresponding external data source through a foreign-data interface. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.

Core Workflow

CREATE EXTENSION grpc_fdw;

CREATE FOREIGN DATA WRAPPER grpc_fdw_handler HANDLER grpc_fdw_handler NO VALIDATOR;
CREATE SERVER user_srv FOREIGN DATA WRAPPER grpc_fdw_handler OPTIONS (server_uri 'http://[::1]:50051');
CREATE FOREIGN TABLE users (
    id integer,
    name text,
    email text
) SERVER user_srv OPTIONS (
    table_option '1',
    table_option2 '2'
);

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • grpc_fdw_handler() is an extension function and returns pg_sys::Datum.

Requirements and Caveats

  • The reviewed control file declares default version 1.0.
  • The control file marks the extension as non-relocatable.
  • The control file does not require superuser-only installation.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader