Foreign Data Wrapper

CREATE EXTENSION postgres_fdw;
CREATE SERVER box2 FOREIGN DATA WRAPPER postgres_fdw
    OPTIONS (host 'box2', dbname 'box2db');
CREATE USER MAPPING FOR alice SERVER box2
    OPTIONS (user 'box2alice');
-- on box2
CREATE TABLE foo (id int, someLegacyUUID varchar(30), name varchar(255));

-- on your server
IMPORT FOREIGN SCHEMA public LIMIT TO (foo)
    FROM SERVER box2 INTO public;

-- Or add only specifc table with limited
CREATE FOREIGN TABLE IF NOT EXISTS <schema>.foo (
	someLegacyUUID uuid no null, -- here casted from varchar(30) to uuid
	name varchar(255)
) 
SERVER box2;

-- If you want to use a different name for the table, in your imported fdt, you can do that as well
-- also you don't need to type schema name if it is public
CREATE FOREIGN TABLE IF NOT EXISTS my_fdt_foo ( 
	...
)
SERVER box2
OPTIONS(table_name 'foo');