$ ./pm-1123847.sh DROP FOREIGN TABLE DROP FOREIGN TABLE DROP SERVER CREATE SERVER CREATE FOREIGN TABLE CREATE FOREIGN TABLE parent_cusp | cusp | isin | deal | tranche | det_date | col_type -------------+--------+---------+------+---------+----------+----------- 38375U | 36182D | 36182D1 | HMAG | HMBSWEE | 20150416 | mortgage 383333 | 361333 | 3618333 | HABS | HABSDDE | 20150330 | mortgage2 (2 rows) vendor | visp | barnembly | deal | tranche | fund | subamt | colamt | basamt --------+--------+-----------+------+---------+------+--------+--------+-------- 38375U | 3DD82D | 36FF333 | HMAG | HMBSWEE | 9010 | 765423 | 364633 | 46566 38EE33 | 361DD3 | 36LLE33 | H99S | HAOOODE | 2330 | 377233 | 347433 | 34488 (2 rows) parent_cusp | cusp | isin | deal | tranche | det_date | col_type | fund | subamt | colamt | basamt -------------+--------+---------+------+---------+----------+-----------+------+--------+--------+-------- 38375U | 36182D | 36182D1 | HMAG | HMBSWEE | 20150416 | mortgage | 9010 | 765423 | 364633 | 46566 383333 | 361333 | 3618333 | HABS | HABSDDE | 20150330 | mortgage2 | | | | 38EE33 | | | H99S | HAOOODE | | | 2330 | 377233 | 347433 | 34488 (3 rows) File_Output parent_cusp|cusp|isin|deal|tranche|det_date|col_type|Fund|subamt|colamt|basamt 38375U|36182D|36182D1|HMAG|HMBSWEE|20150416|mortgage|9010|765423|364633|46566 383333|361333|3618333|HABS|HABSDDE|20150330|mortgage2|||| 38EE33|||H99S|HAOOODE|||2330|377233|347433|34488