postgresql_fdw contrib module.
SET client_min_messages = warning;
\set ECHO none
-- define fdw-related objects
-CREATE FOREIGN DATA WRAPPER postgresql_fdw
- HANDLER postgresql_fdw_handler
- VALIDATOR postgresql_fdw_validator;
CREATE SERVER loopback1 FOREIGN DATA WRAPPER postgresql_fdw
OPTIONS (dbname 'contrib_regression');
CREATE SERVER loopback2 FOREIGN DATA WRAPPER postgresql_fdw
RETURNS fdw_handler
AS 'MODULE_PATHNAME','postgresql_fdw_handler'
LANGUAGE C STRICT;
+
+CREATE FOREIGN DATA WRAPPER postgresql_fdw
+VALIDATOR postgresql_fdw_validator
+HANDLER postgresql_fdw_handler;
+
\set ECHO all
-- define fdw-related objects
-CREATE FOREIGN DATA WRAPPER postgresql_fdw
- HANDLER postgresql_fdw_handler
- VALIDATOR postgresql_fdw_validator;
-
CREATE SERVER loopback1 FOREIGN DATA WRAPPER postgresql_fdw
OPTIONS (dbname 'contrib_regression');
CREATE SERVER loopback2 FOREIGN DATA WRAPPER postgresql_fdw
-- Adjust this setting to control where the objects get dropped.
set search_path = public;
+DROP FOREIGN DATA WRAPPER postgresql_fdw;
DROP FUNCTION postgresql_fdw_handler ();