supabase / wrappers

Postgres Foreign Data Wrapper development framework in Rust.
http://fdw.dev
Apache License 2.0
562 stars 56 forks source link

Give the full server struct to the FDW when instanciating it #323

Closed remilapeyre closed 3 months ago

remilapeyre commented 3 months ago

The complete SQL command to create a foreign data wrapper is

CREATE SERVER [ IF NOT EXISTS ] server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ]
    FOREIGN DATA WRAPPER fdw_name
    [ OPTIONS ( option 'value' [, ... ] ) ]

At this time only the options are given to the Foreign Data Wrapper implementation. This patch changes the signature of ForeignDataWrapper::new() to give it the full structure that matches PostgreSQL ForeignServer to expose the server_name, server_type and server_version attributes.