trino_fdw
pgtrino · Foreign-data wrapper for querying and modifying Trino tables over HTTP.
Overview
PostgreSQL · 14, 15, 16, 17
Usage
Sources:
trino_fdw exposes Trino tables as PostgreSQL foreign tables using libcurl. Upstream documents PostgreSQL 14–17. Install the extension as a superuser, then configure the server and caller mapping. It requires no shared preload.
Core Workflow
Operational Boundaries
Server options include host, port, ssl, ssl_verify, catalog, schema, spooling and batch_size. Use HTTPS and certificate verification for remote credentials. Mapping options user and password select the Trino identity; PostgreSQL foreign-table privileges apply in addition to Trino authorization. Projection, eligible filters, joins, aggregates and ordering can be pushed down; EXPLAIN shows the remote SQL and ANALYZE collects local planner statistics. trino_query returns records and trino_execute returns an update count; both require USAGE on the foreign server. UPDATE/DELETE require a fully shippable statement and connector support; RETURNING, joined modifications and row triggers are unsupported. Each remote statement or INSERT batch autocommits: a PostgreSQL rollback cannot undo it. Spooling also requires the PostgreSQL server to reach Trino object storage; disable spooling if that path is unavailable.