CREATE FOREIGN DATA WRAPPER plproxy OPTIONS (
    query_timeout '1800'
);

CREATE SERVER cluster FOREIGN DATA WRAPPER plproxy OPTIONS (
    p0 'host=host0',
    p1 'host=host1',
    p2 'host=host2',
    p3 'host=host3'
);

CREATE USER MAPPING FOR peter SERVER cluster OPTIONS (
    user 'peter',
    password 'sekret'
);

CREATE FOREIGN DATA WRAPPER foo;

CREATE SERVER foo FOREIGN DATA WRAPPER foo;

CREATE FOREIGN TABLE foobar (a int, b text) SERVER foo OPTIONS (
    bar 'bar',
    baz 'baz'
);

ALTER FOREIGN TABLE foobar ALTER COLUMN a OPTIONS (abc 'def');
