fix foreign_data regression tests, remove foreign_data_1.out
authorTomas Vondra <[email protected]>
Sun, 22 Jan 2017 16:14:12 +0000 (17:14 +0100)
committerTomas Vondra <[email protected]>
Sun, 22 Jan 2017 16:14:12 +0000 (17:14 +0100)
As XL does not support FDW, the resolution was mostly about adding
the 'does not exist' errors as narrower table listings as expected.
Also remove the foreign_data_1.out, mostly for the same reasons as
arrays_1.out (unnecessary and stale).

src/test/regress/expected/foreign_data.out
src/test/regress/expected/foreign_data_1.out [deleted file]

index e77ce00204ae6571ed54f12e23a502630708b456..c668e8e5582f99a2e9309b5bb0afe2230886b2ae 100644 (file)
@@ -45,9 +45,9 @@ CREATE FOREIGN DATA WRAPPER foo;
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
 \dew
-                        List of foreign-data wrappers
-    Name    |           Owner           | Handler |        Validator         
-------------+---------------------------+---------+--------------------------
+   List of foreign-data wrappers
+ Name | Owner | Handler | Validator 
+------+-------+---------+-----------
 (0 rows)
 
 CREATE FOREIGN DATA WRAPPER foo; -- duplicate
@@ -59,9 +59,9 @@ CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1');
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
 \dew+
-                                                 List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |  FDW Options  | Description 
-------------+---------------------------+---------+--------------------------+-------------------+---------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 DROP FOREIGN DATA WRAPPER foo;
@@ -73,9 +73,9 @@ CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', another '2');
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
 \dew+
-                                                       List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |        FDW Options         | Description 
-------------+---------------------------+---------+--------------------------+-------------------+----------------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 DROP FOREIGN DATA WRAPPER foo;
@@ -89,9 +89,9 @@ CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
 \dew+
-                                                List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges | FDW Options | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 -- ALTER FOREIGN DATA WRAPPER
@@ -104,9 +104,9 @@ ERROR:  foreign-data wrapper "foo" does not exist
 ALTER FOREIGN DATA WRAPPER foo NO VALIDATOR;
 ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges | FDW Options | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');
@@ -118,17 +118,17 @@ ERROR:  foreign-data wrapper "foo" does not exist
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);
 ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                 List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |  FDW Options   | Description 
-------------+---------------------------+---------+--------------------------+-------------------+----------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4');
 ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                 List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |  FDW Options   | Description 
-------------+---------------------------+---------+--------------------------+-------------------+----------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '2');
@@ -136,9 +136,9 @@ ERROR:  foreign-data wrapper "foo" does not exist
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (b '4');             -- ERROR
 ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 SET ROLE regress_test_role;
@@ -149,14 +149,13 @@ SET ROLE regress_test_role_super;
 ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5');
 ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role;  -- ERROR
-ERROR:  permission denied to change owner of foreign-data wrapper "foo"
-HINT:  The owner of a foreign-data wrapper must be a superuser.
+ERROR:  foreign-data wrapper "foo" does not exist
 ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role_super;
 ERROR:  foreign-data wrapper "foo" does not exist
 ALTER ROLE regress_test_role_super NOSUPERUSER;
@@ -166,46 +165,44 @@ ERROR:  permission denied to alter foreign-data wrapper "foo"
 HINT:  Must be superuser to alter a foreign-data wrapper.
 RESET ROLE;
 \dew+
-                  List of foreign-data wrappers
-                                                        List of foreign-data wrappers
-    Name    |           Owner           | Handler |        Validator         | Access privileges |         FDW Options          | Description 
-------------+---------------------------+---------+--------------------------+-------------------+------------------------------+-------------
+                           List of foreign-data wrappers
+ Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 ALTER FOREIGN DATA WRAPPER foo RENAME TO foo1;
+ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                        List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |         FDW Options          | Description 
-------------+---------------------------+---------+--------------------------+-------------------+------------------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
+ALTER FOREIGN DATA WRAPPER foo1 RENAME TO foo;
+ERROR:  foreign-data wrapper "foo1" does not exist
 -- DROP FOREIGN DATA WRAPPER
 DROP FOREIGN DATA WRAPPER nonexistent;                      -- ERROR
 ERROR:  foreign-data wrapper "nonexistent" does not exist
 DROP FOREIGN DATA WRAPPER IF EXISTS nonexistent;
 NOTICE:  foreign-data wrapper "nonexistent" does not exist, skipping
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 DROP ROLE regress_test_role_super;                          -- ERROR
 SET ROLE regress_test_role_super;
 ERROR:  role "regress_test_role_super" does not exist
-DROP FOREIGN DATA WRAPPER foo;                              -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-RESET ROLE;
-ALTER ROLE regress_test_role_super SUPERUSER;
-ERROR:  role "regress_test_role_super" does not exist
 DROP FOREIGN DATA WRAPPER foo;
 ERROR:  foreign-data wrapper "foo" does not exist
+RESET ROLE;
 DROP ROLE regress_test_role_super;
 ERROR:  role "regress_test_role_super" does not exist
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 CREATE FOREIGN DATA WRAPPER foo;
@@ -220,60 +217,54 @@ CREATE USER MAPPING FOR current_user SERVER s1;
 ERROR:  Postgres-XL does not support USER MAPPING yet
 DETAIL:  The feature is not currently supported
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 \des+
-                              List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options 
-------+-------+----------------------+-------------------+------+---------+---------
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 \deu+
-    List of user mappings
- Server | User name | Options 
---------+-----------+---------
+      List of user mappings
+ Server | User name | FDW Options 
+--------+-----------+-------------
 (0 rows)
 
 DROP FOREIGN DATA WRAPPER foo;                              -- ERROR
-ERROR:  cannot drop foreign-data wrapper foo because other objects depend on it
-DETAIL:  server s1 depends on foreign-data wrapper foo
-user mapping for regress_foreign_data_user on server s1 depends on server s1
-HINT:  Use DROP ... CASCADE to drop the dependent objects too.
+ERROR:  foreign-data wrapper "foo" does not exist
 SET ROLE regress_test_role;
 DROP FOREIGN DATA WRAPPER foo CASCADE;                      -- ERROR
-ERROR:  permission denied to drop foreign-data wrapper "foo"
-HINT:  Must be superuser to drop a foreign-data wrapper.
+ERROR:  foreign-data wrapper "foo" does not exist
 RESET ROLE;
 DROP FOREIGN DATA WRAPPER foo CASCADE;
-NOTICE:  drop cascades to 2 other objects
-DETAIL:  drop cascades to server s1
-drop cascades to user mapping for regress_foreign_data_user on server s1
+ERROR:  foreign-data wrapper "foo" does not exist
 \dew+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                           List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
+------+-------+---------+-----------+-------------------+-------------+-------------
 (0 rows)
 
 \des+
-                              List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options 
-------+-------+----------------------+-------------------+------+---------+---------
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 \deu+
-    List of user mappings
- Server | User name | Options 
---------+-----------+---------
+      List of user mappings
+ Server | User name | FDW Options 
+--------+-----------+-------------
 (0 rows)
 
 -- exercise CREATE SERVER
 CREATE SERVER s1 FOREIGN DATA WRAPPER foo;                  -- ERROR
 ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
-CREATE FOREIGN DATA WRAPPER foo OPTIONS (test_wrapper 'true');
+CREATE FOREIGN DATA WRAPPER foo OPTIONS ("test wrapper" 'true');
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
 CREATE SERVER s1 FOREIGN DATA WRAPPER foo;
@@ -307,9 +298,9 @@ CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbna
 ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
 \des+
-                                                     List of foreign-data wrappers
   Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
+                                       List of foreign servers
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 SET ROLE regress_test_role;
@@ -325,13 +316,9 @@ ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
 RESET ROLE;
 \des+
-                                                     List of foreign-data wrappers
-    Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
-(0 rows)
-                              List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options 
-------+-------+----------------------+-------------------+------+---------+---------
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_test_role;
@@ -349,13 +336,9 @@ CREATE SERVER t2 FOREIGN DATA WRAPPER foo;
 ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
 \des+
-                                                     List of foreign-data wrappers
-    Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
-(0 rows)
-                              List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options 
-------+-------+----------------------+-------------------+------+---------+---------
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 RESET ROLE;
@@ -371,20 +354,16 @@ ALTER SERVER s1 VERSION '1.0' OPTIONS (servername 's1');
 ERROR:  server "s1" does not exist
 ALTER SERVER s2 VERSION '1.1';
 ERROR:  server "s2" does not exist
-ALTER SERVER s3 OPTIONS (tnsname 'orcl', port '1521');
+ALTER SERVER s3 OPTIONS ("tns name" 'orcl', port '1521');
 ERROR:  server "s3" does not exist
 GRANT USAGE ON FOREIGN SERVER s1 TO regress_test_role;
 ERROR:  server "s1" does not exist
 GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
 ERROR:  server "s6" does not exist
 \des+
-                                                     List of foreign-data wrappers
-    Name    |           Owner           | Handler |        Validator         | Access privileges |      FDW Options      | Description 
-------------+---------------------------+---------+--------------------------+-------------------+-----------------------+-------------
-(0 rows)
-                              List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options 
-------+-------+----------------------+-------------------+------+---------+---------
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
 (0 rows)
 
 SET ROLE regress_test_role;
@@ -423,40 +402,21 @@ ERROR:  server "s1" does not exist
 RESET ROLE;
 DROP ROLE regress_test_indirect;                            -- ERROR
 \des+
-                                                                                 List of foreign servers
- Name |           Owner           | Foreign-data wrapper |                   Access privileges                   |  Type  | Version |             FDW Options              | Description 
-------+---------------------------+----------------------+-------------------------------------------------------+--------+---------+--------------------------------------+-------------
- s1   | regress_test_indirect     | foo                  | regress_test_indirect=U/regress_test_indirect         |        | 1.1     | (servername 's1')                    | 
- s2   | regress_foreign_data_user | foo                  |                                                       |        | 1.1     | (host 'a', dbname 'b')               | 
- s3   | regress_foreign_data_user | foo                  |                                                       | oracle |         | ("tns name" 'orcl', port '1521')     | 
- s4   | regress_foreign_data_user | foo                  |                                                       | oracle |         | (host 'a', dbname 'b')               | 
- s5   | regress_foreign_data_user | foo                  |                                                       |        | 15.0    |                                      | 
- s6   | regress_foreign_data_user | foo                  | regress_foreign_data_user=U/regress_foreign_data_user+|        | 16.0    | (host 'a', dbname 'b')               | 
-      |                           |                      | regress_test_role2=U*/regress_foreign_data_user       |        |         |                                      | 
- s7   | regress_foreign_data_user | foo                  |                                                       | oracle | 17.0    | (host 'a', dbname 'b')               | 
- s8   | regress_foreign_data_user | postgresql           |                                                       |        |         | (dbname 'db1', connect_timeout '30') | 
- t1   | regress_test_role         | foo                  |                                                       |        |         |                                      | 
- t2   | regress_test_role         | foo                  |                                                       |        |         |                                      | 
-(10 rows)
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
+(0 rows)
 
 ALTER SERVER s8 RENAME to s8new;
+ERROR:  server "s8" does not exist
 \des+
-                                                                                 List of foreign servers
- Name  |           Owner           | Foreign-data wrapper |                   Access privileges                   |  Type  | Version |             FDW Options              | Description 
--------+---------------------------+----------------------+-------------------------------------------------------+--------+---------+--------------------------------------+-------------
- s1    | regress_test_indirect     | foo                  | regress_test_indirect=U/regress_test_indirect         |        | 1.1     | (servername 's1')                    | 
- s2    | regress_foreign_data_user | foo                  |                                                       |        | 1.1     | (host 'a', dbname 'b')               | 
- s3    | regress_foreign_data_user | foo                  |                                                       | oracle |         | ("tns name" 'orcl', port '1521')     | 
- s4    | regress_foreign_data_user | foo                  |                                                       | oracle |         | (host 'a', dbname 'b')               | 
- s5    | regress_foreign_data_user | foo                  |                                                       |        | 15.0    |                                      | 
- s6    | regress_foreign_data_user | foo                  | regress_foreign_data_user=U/regress_foreign_data_user+|        | 16.0    | (host 'a', dbname 'b')               | 
-       |                           |                      | regress_test_role2=U*/regress_foreign_data_user       |        |         |                                      | 
- s7    | regress_foreign_data_user | foo                  |                                                       | oracle | 17.0    | (host 'a', dbname 'b')               | 
- s8new | regress_foreign_data_user | postgresql           |                                                       |        |         | (dbname 'db1', connect_timeout '30') | 
- t1    | regress_test_role         | foo                  |                                                       |        |         |                                      | 
- t2    | regress_test_role         | foo                  |                                                       |        |         |                                      | 
-(10 rows)
+                                       List of foreign servers
+ Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
+------+-------+----------------------+-------------------+------+---------+-------------+-------------
+(0 rows)
 
+ALTER SERVER s8new RENAME to s8;
+ERROR:  server "s8new" does not exist
 -- DROP SERVER
 DROP SERVER nonexistent;                                    -- ERROR
 ERROR:  server "nonexistent" does not exist
@@ -502,11 +462,9 @@ List of user mappings
 (0 rows)
 
 DROP SERVER s3;                                             -- ERROR
-ERROR:  cannot drop server s3 because other objects depend on it
-DETAIL:  user mapping for regress_foreign_data_user on server s3 depends on server s3
-HINT:  Use DROP ... CASCADE to drop the dependent objects too.
+ERROR:  server "s3" does not exist
 DROP SERVER s3 CASCADE;
-NOTICE:  drop cascades to user mapping for regress_foreign_data_user on server s3
+ERROR:  server "s3" does not exist
 \des
        List of foreign servers
  Name | Owner | Foreign-data wrapper 
@@ -532,7 +490,7 @@ DETAIL:  The feature is not currently supported
 CREATE USER MAPPING FOR user SERVER s4;                     -- ERROR duplicate
 ERROR:  Postgres-XL does not support USER MAPPING yet
 DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR public SERVER s4 OPTIONS (mapping 'is public');
+CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public');
 ERROR:  Postgres-XL does not support USER MAPPING yet
 DETAIL:  The feature is not currently supported
 CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 'secret');    -- ERROR
@@ -595,9 +553,9 @@ ALTER USER MAPPING FOR public SERVER t1 OPTIONS (ADD modified '1');
 ERROR:  server "t1" does not exist
 RESET ROLE;
 \deu+
-    List of user mappings
- Server | User name | Options 
---------+-----------+---------
+      List of user mappings
+ Server | User name | FDW Options 
+--------+-----------+-------------
 (0 rows)
 
 -- DROP USER MAPPING
@@ -627,9 +585,10 @@ List of user mappings
  Server | User name 
 --------+-----------
 (0 rows)
+
 -- CREATE FOREIGN TABLE
 CREATE SCHEMA foreign_schema;
-CREATE SERVER sc FOREIGN DATA WRAPPER dummy;
+CREATE SERVER s0 FOREIGN DATA WRAPPER dummy;
 ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
 CREATE FOREIGN TABLE ft1 ();                                    -- ERROR
@@ -675,27 +634,16 @@ CREATE FOREIGN TABLE ft1 (
        c3 date,
        CHECK (c3 BETWEEN '1994-01-01'::date AND '1994-01-31'::date)
 ) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
+ERROR:  server "s0" does not exist
 COMMENT ON FOREIGN TABLE ft1 IS 'ft1';
 ERROR:  relation "ft1" does not exist
 COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
 ERROR:  relation "ft1" does not exist
 \d+ ft1
-                                      Foreign table "public.ft1"
- Column |  Type   | Modifiers |          FDW Options           | Storage  | Stats target | Description 
---------+---------+-----------+--------------------------------+----------+--------------+-------------
- c1     | integer | not null  | ("param 1" 'val1')             | plain    |              | ft1.c1
- c2     | text    |           | (param2 'val2', param3 'val3') | extended |              | 
- c3     | date    |           |                                | plain    |              | 
-Check constraints:
-    "ft1_c2_check" CHECK (c2 <> ''::text)
-    "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-
 \det+
-      List of foreign tables
- Schema | Table | Server | Options 
---------+-------+--------+---------
+               List of foreign tables
+ Schema | Table | Server | FDW Options | Description 
+--------+-------+--------+-------------+-------------
 (0 rows)
 
 CREATE INDEX id_ft1_c2 ON ft1 (c2);                             -- ERROR
@@ -718,7 +666,9 @@ ERROR:  relation "ft1" does not exist
 COMMENT ON COLUMN ft1.c1 IS NULL;
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c4 integer;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c5 integer DEFAULT 0;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c6 integer;
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c7 integer NOT NULL;
@@ -726,9 +676,13 @@ ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c8 integer;
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c9 integer;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1');
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL;
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;
@@ -738,35 +692,23 @@ ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN xmin OPTIONS (ADD p1 'v1'); -- ERROR
-ERROR:  cannot alter system column "xmin"
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2 'v2'),
                         ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2 'v2');
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET STATISTICS 10000;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100);
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN;
+ERROR:  relation "ft1" does not exist
 \d+ ft1
-                                      Foreign table "public.ft1"
- Column |  Type   | Modifiers |          FDW Options           | Storage  | Stats target | Description 
---------+---------+-----------+--------------------------------+----------+--------------+-------------
- c1     | integer | not null  | ("param 1" 'val1')             | plain    | 10000        | 
- c2     | text    |           | (param2 'val2', param3 'val3') | extended |              | 
- c3     | date    |           |                                | plain    |              | 
- c4     | integer | default 0 |                                | plain    |              | 
- c5     | integer |           |                                | plain    |              | 
- c6     | integer | not null  |                                | plain    |              | 
- c7     | integer |           | (p1 'v1', p2 'v2')             | plain    |              | 
- c8     | text    |           | (p2 'V2')                      | plain    |              | 
- c9     | integer |           |                                | plain    |              | 
- c10    | integer |           | (p1 'v1')                      | plain    |              | 
-Check constraints:
-    "ft1_c2_check" CHECK (c2 <> ''::text)
-    "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-
 -- can't change the column type if it's used elsewhere
 CREATE TABLE use_ft1_column_type (x ft1);
 ERROR:  type "ft1" does not exist
@@ -775,19 +717,21 @@ LINE 1: CREATE TABLE use_ft1_column_type (x ft1);
 ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE integer; -- ERROR
 ERROR:  relation "ft1" does not exist
 DROP TABLE use_ft1_column_type;
+ERROR:  table "use_ft1_column_type" does not exist
 ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7);                   -- ERROR
-ERROR:  primary key constraints are not supported on foreign tables
-LINE 1: ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7);
-                                    ^
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR
-ERROR:  "ft1" is not a table
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 DROP CONSTRAINT no_const;               -- ERROR
-ERROR:  constraint "no_const" of relation "ft1" does not exist
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 DROP CONSTRAINT IF EXISTS no_const;
-NOTICE:  constraint "no_const" of relation "ft1" does not exist, skipping
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 SET WITH OIDS;
+ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 OWNER TO regress_test_role;
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape '@');
@@ -807,24 +751,6 @@ ERROR:  relation "foreign_schema.ft1" does not exist
 ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
 ERROR:  relation "foreign_schema.ft1" does not exist
 \d foreign_schema.foreign_table_1
-             Foreign table "foreign_schema.foreign_table_1"
-      Column      |  Type   | Modifiers |          FDW Options           
-------------------+---------+-----------+--------------------------------
- foreign_column_1 | integer | not null  | ("param 1" 'val1')
- c2               | text    |           | (param2 'val2', param3 'val3')
- c3               | date    |           | 
- c4               | integer | default 0 | 
- c5               | integer |           | 
- c6               | integer | not null  | 
- c7               | integer |           | (p1 'v1', p2 'v2')
- c8               | text    |           | (p2 'V2')
- c10              | integer |           | (p1 'v1')
-Check constraints:
-    "ft1_c2_check" CHECK (c2 <> ''::text)
-    "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date)
-Server: s0
-FDW Options: (quote '~', "be quoted" 'value', escape '@')
-
 -- alter noexisting table
 ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c4 integer;
 NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
@@ -884,6 +810,7 @@ SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
  foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier 
 ------------------------+---------------------+------------------------------+---------------------------+---------------------+------------------------+--------------------------
 (0 rows)
+
 SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3;
  foreign_server_catalog | foreign_server_name | option_name | option_value 
 ------------------------+---------------------+-------------+--------------
@@ -900,22 +827,14 @@ SELECT * FROM information_schema.user_mapping_options ORDER BY lower(authorizati
 (0 rows)
 
 SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
-          grantor          |          grantee          | object_catalog | object_schema | object_name |     object_type      | privilege_type | is_grantable 
----------------------------+---------------------------+----------------+---------------+-------------+----------------------+----------------+--------------
- regress_foreign_data_user | regress_foreign_data_user | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | YES
- regress_foreign_data_user | regress_test_indirect     | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | NO
- regress_test_indirect     | regress_test_indirect     | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
- regress_test_indirect     | regress_test_role2        | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
-(4 rows)
+ grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
+---------+---------+----------------+---------------+-------------+-------------+----------------+--------------
+(0 rows)
 
 SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
-          grantor          |          grantee          | object_catalog | object_schema | object_name |     object_type      | privilege_type | is_grantable 
----------------------------+---------------------------+----------------+---------------+-------------+----------------------+----------------+--------------
- regress_foreign_data_user | regress_foreign_data_user | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | YES
- regress_foreign_data_user | regress_test_indirect     | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | NO
- regress_test_indirect     | regress_test_indirect     | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
- regress_test_indirect     | regress_test_role2        | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
-(4 rows)
+ grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
+---------+---------+----------------+---------------+-------------+-------------+----------------+--------------
+(0 rows)
 
 SELECT * FROM information_schema.foreign_tables ORDER BY 1, 2, 3;
  foreign_table_catalog | foreign_table_schema | foreign_table_name | foreign_server_catalog | foreign_server_name 
@@ -934,20 +853,14 @@ SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
 (0 rows)
 
 SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
-          grantor          |        grantee        | object_catalog | object_schema | object_name |     object_type      | privilege_type | is_grantable 
----------------------------+-----------------------+----------------+---------------+-------------+----------------------+----------------+--------------
- regress_foreign_data_user | regress_test_indirect | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | NO
- regress_test_indirect     | regress_test_indirect | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
- regress_test_indirect     | regress_test_role2    | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
-(3 rows)
+ grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
+---------+---------+----------------+---------------+-------------+-------------+----------------+--------------
+(0 rows)
 
 SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
-          grantor          |        grantee        | object_catalog | object_schema | object_name |     object_type      | privilege_type | is_grantable 
----------------------------+-----------------------+----------------+---------------+-------------+----------------------+----------------+--------------
- regress_foreign_data_user | regress_test_indirect | regression     |               | foo         | FOREIGN DATA WRAPPER | USAGE          | NO
- regress_test_indirect     | regress_test_indirect | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
- regress_test_indirect     | regress_test_role2    | regression     |               | s6          | FOREIGN SERVER       | USAGE          | YES
-(3 rows)
+ grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
+---------+---------+----------------+---------------+-------------+-------------+----------------+--------------
+(0 rows)
 
 DROP USER MAPPING FOR current_user SERVER t1;
 ERROR:  server "t1" does not exist
@@ -1047,11 +960,9 @@ ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true');         -- ERROR
 ERROR:  permission denied to alter foreign-data wrapper "foo"
 HINT:  Must be superuser to alter a foreign-data wrapper.
 ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_unprivileged_role; -- ERROR
-ERROR:  permission denied to change owner of foreign-data wrapper "foo"
-HINT:  Must be superuser to change owner of a foreign-data wrapper.
+ERROR:  foreign-data wrapper "foo" does not exist
 DROP FOREIGN DATA WRAPPER foo;                                  -- ERROR
-ERROR:  permission denied to drop foreign-data wrapper "foo"
-HINT:  Must be superuser to drop a foreign-data wrapper.
+ERROR:  foreign-data wrapper "foo" does not exist
 GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;   -- ERROR
 ERROR:  foreign-data wrapper "foo" does not exist
 CREATE SERVER s9 FOREIGN DATA WRAPPER foo;                      -- ERROR
@@ -1059,7 +970,7 @@ ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
 ALTER SERVER s4 VERSION '0.5';                                  -- ERROR
 ERROR:  server "s4" does not exist
-ALTER SERVER s4 OWNER TO unprivileged_role;                     -- ERROR
+ALTER SERVER s4 OWNER TO regress_unprivileged_role;             -- ERROR
 ERROR:  server "s4" does not exist
 DROP SERVER s4;                                                 -- ERROR
 ERROR:  server "s4" does not exist
@@ -1073,11 +984,11 @@ ERROR:  server "s6" does not exist
 DROP USER MAPPING FOR regress_test_role SERVER s6;              -- ERROR
 ERROR:  server "s6" does not exist
 RESET ROLE;
-GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO unprivileged_role;
+GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_unprivileged_role;
 ERROR:  foreign-data wrapper "postgresql" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO unprivileged_role WITH GRANT OPTION;
+GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_unprivileged_role WITH GRANT OPTION;
 ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE unprivileged_role;
+SET ROLE regress_unprivileged_role;
 CREATE FOREIGN DATA WRAPPER foobar;                             -- ERROR
 ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
 DETAIL:  The feature is not currently supported
@@ -1085,8 +996,7 @@ ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true');         -- ERROR
 ERROR:  permission denied to alter foreign-data wrapper "foo"
 HINT:  Must be superuser to alter a foreign-data wrapper.
 DROP FOREIGN DATA WRAPPER foo;                                  -- ERROR
-ERROR:  permission denied to drop foreign-data wrapper "foo"
-HINT:  Must be superuser to drop a foreign-data wrapper.
+ERROR:  foreign-data wrapper "foo" does not exist
 GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_test_role; -- WARNING
 ERROR:  foreign-data wrapper "postgresql" does not exist
 GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;
@@ -1113,11 +1023,11 @@ ERROR:  server "s6" does not exist
 DROP USER MAPPING FOR regress_test_role SERVER s6;              -- ERROR
 ERROR:  server "s6" does not exist
 RESET ROLE;
-REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM unprivileged_role; -- ERROR
+REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_unprivileged_role; -- ERROR
 ERROR:  foreign-data wrapper "foo" does not exist
-REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM unprivileged_role CASCADE;
+REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_unprivileged_role CASCADE;
 ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE unprivileged_role;
+SET ROLE regress_unprivileged_role;
 GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;   -- ERROR
 ERROR:  foreign-data wrapper "foo" does not exist
 CREATE SERVER s10 FOREIGN DATA WRAPPER foo;                     -- ERROR
@@ -1131,16 +1041,14 @@ CREATE USER MAPPING FOR current_user SERVER s9;
 ERROR:  Postgres-XL does not support USER MAPPING yet
 DETAIL:  The feature is not currently supported
 DROP SERVER s9 CASCADE;
-NOTICE:  drop cascades to 2 other objects
-DETAIL:  drop cascades to user mapping for public on server s9
-drop cascades to user mapping for regress_unprivileged_role on server s9
+ERROR:  server "s9" does not exist
 RESET ROLE;
 CREATE SERVER s9 FOREIGN DATA WRAPPER foo;
 ERROR:  Postgres-XL does not support SERVER yet
 DETAIL:  The feature is not currently supported
-GRANT USAGE ON FOREIGN SERVER s9 TO unprivileged_role;
+GRANT USAGE ON FOREIGN SERVER s9 TO regress_unprivileged_role;
 ERROR:  server "s9" does not exist
-SET ROLE unprivileged_role;
+SET ROLE regress_unprivileged_role;
 ALTER SERVER s9 VERSION '1.2';                                  -- ERROR
 ERROR:  server "s9" does not exist
 GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role;          -- WARNING
@@ -1161,32 +1069,46 @@ CREATE TRIGGER trigtest_before_stmt BEFORE INSERT OR UPDATE OR DELETE
 ON foreign_schema.foreign_table_1
 FOR EACH STATEMENT
 EXECUTE PROCEDURE dummy_trigger();
+ERROR:  Postgres-XL does not support TRIGGER yet
+DETAIL:  The feature is not currently supported
 CREATE TRIGGER trigtest_after_stmt AFTER INSERT OR UPDATE OR DELETE
 ON foreign_schema.foreign_table_1
 FOR EACH STATEMENT
 EXECUTE PROCEDURE dummy_trigger();
+ERROR:  Postgres-XL does not support TRIGGER yet
+DETAIL:  The feature is not currently supported
 CREATE TRIGGER trigtest_before_row BEFORE INSERT OR UPDATE OR DELETE
 ON foreign_schema.foreign_table_1
 FOR EACH ROW
 EXECUTE PROCEDURE dummy_trigger();
+ERROR:  Postgres-XL does not support TRIGGER yet
+DETAIL:  The feature is not currently supported
 CREATE TRIGGER trigtest_after_row AFTER INSERT OR UPDATE OR DELETE
 ON foreign_schema.foreign_table_1
 FOR EACH ROW
 EXECUTE PROCEDURE dummy_trigger();
+ERROR:  Postgres-XL does not support TRIGGER yet
+DETAIL:  The feature is not currently supported
 CREATE CONSTRAINT TRIGGER trigtest_constraint AFTER INSERT OR UPDATE OR DELETE
 ON foreign_schema.foreign_table_1
 FOR EACH ROW
 EXECUTE PROCEDURE dummy_trigger();
-ERROR:  "foreign_table_1" is a foreign table
-DETAIL:  Foreign tables cannot have constraint triggers.
+ERROR:  Postgres-XL does not support TRIGGER yet
+DETAIL:  The feature is not currently supported
 ALTER FOREIGN TABLE foreign_schema.foreign_table_1
        DISABLE TRIGGER trigtest_before_stmt;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 ALTER FOREIGN TABLE foreign_schema.foreign_table_1
        ENABLE TRIGGER trigtest_before_stmt;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 DROP TRIGGER trigtest_before_stmt ON foreign_schema.foreign_table_1;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 DROP TRIGGER trigtest_before_row ON foreign_schema.foreign_table_1;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 DROP TRIGGER trigtest_after_stmt ON foreign_schema.foreign_table_1;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 DROP TRIGGER trigtest_after_row ON foreign_schema.foreign_table_1;
+ERROR:  relation "foreign_schema.foreign_table_1" does not exist
 DROP FUNCTION dummy_trigger();
 -- Table inheritance
 CREATE TABLE pt1 (
@@ -1196,6 +1118,7 @@ CREATE TABLE pt1 (
 );
 CREATE FOREIGN TABLE ft2 () INHERITS (pt1)
   SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
+ERROR:  server "s0" does not exist
 \d+ pt1
                           Table "public.pt1"
  Column |  Type   | Modifiers | Storage  | Stats target | Description 
@@ -1203,20 +1126,12 @@ CREATE FOREIGN TABLE ft2 () INHERITS (pt1)
  c1     | integer | not null  | plain    |              | 
  c2     | text    |           | extended |              | 
  c3     | date    |           | plain    |              | 
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 DROP FOREIGN TABLE ft2;
+ERROR:  foreign table "ft2" does not exist
 \d+ pt1
                           Table "public.pt1"
  Column |  Type   | Modifiers | Storage  | Stats target | Description 
@@ -1224,23 +1139,18 @@ DROP FOREIGN TABLE ft2;
  c1     | integer | not null  | plain    |              | 
  c2     | text    |           | extended |              | 
  c3     | date    |           | plain    |              | 
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 CREATE FOREIGN TABLE ft2 (
        c1 integer NOT NULL,
        c2 text,
        c3 date
 ) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
+ERROR:  server "s0" does not exist
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-
 ALTER FOREIGN TABLE ft2 INHERIT pt1;
+ERROR:  relation "ft2" does not exist
 \d+ pt1
                           Table "public.pt1"
  Column |  Type   | Modifiers | Storage  | Stats target | Description 
@@ -1248,61 +1158,22 @@ ALTER FOREIGN TABLE ft2 INHERIT pt1;
  c1     | integer | not null  | plain    |              | 
  c2     | text    |           | extended |              | 
  c3     | date    |           | plain    |              | 
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 CREATE TABLE ct3() INHERITS(ft2);
+ERROR:  relation "ft2" does not exist
 CREATE FOREIGN TABLE ft3 (
        c1 integer NOT NULL,
        c2 text,
        c3 date
 ) INHERITS(ft2)
   SERVER s0;
-NOTICE:  merging column "c1" with inherited definition
-NOTICE:  merging column "c2" with inherited definition
-NOTICE:  merging column "c3" with inherited definition
+ERROR:  relation "ft2" does not exist
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Child tables: ct3,
-              ft3
-
 \d+ ct3
-                          Table "public.ct3"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Inherits: ft2
-
 \d+ ft3
-                             Foreign table "public.ft3"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-Inherits: ft2
-
 -- add attributes recursively
 ALTER TABLE pt1 ADD COLUMN c4 integer;
 ALTER TABLE pt1 ADD COLUMN c5 integer DEFAULT 0;
@@ -1321,62 +1192,18 @@ ALTER TABLE pt1 ADD COLUMN c8 integer;
  c6     | integer |           | plain    |              | 
  c7     | integer | not null  | plain    |              | 
  c8     | integer |           | plain    |              | 
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
- c4     | integer |           |             | plain    |              | 
- c5     | integer | default 0 |             | plain    |              | 
- c6     | integer |           |             | plain    |              | 
- c7     | integer | not null  |             | plain    |              | 
- c8     | integer |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Child tables: ct3,
-              ft3
-
 \d+ ct3
-                          Table "public.ct3"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
- c4     | integer |           | plain    |              | 
- c5     | integer | default 0 | plain    |              | 
- c6     | integer |           | plain    |              | 
- c7     | integer | not null  | plain    |              | 
- c8     | integer |           | plain    |              | 
-Inherits: ft2
-
 \d+ ft3
-                             Foreign table "public.ft3"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
- c4     | integer |           |             | plain    |              | 
- c5     | integer | default 0 |             | plain    |              | 
- c6     | integer |           |             | plain    |              | 
- c7     | integer | not null  |             | plain    |              | 
- c8     | integer |           |             | plain    |              | 
-Server: s0
-Inherits: ft2
-
 -- alter attributes recursively
 ALTER TABLE pt1 ALTER COLUMN c4 SET DEFAULT 0;
 ALTER TABLE pt1 ALTER COLUMN c5 DROP DEFAULT;
 ALTER TABLE pt1 ALTER COLUMN c6 SET NOT NULL;
 ALTER TABLE pt1 ALTER COLUMN c7 DROP NOT NULL;
 ALTER TABLE pt1 ALTER COLUMN c8 TYPE char(10) USING '0';        -- ERROR
-ERROR:  "ft2" is not a table
 ALTER TABLE pt1 ALTER COLUMN c8 TYPE char(10);
 ALTER TABLE pt1 ALTER COLUMN c8 SET DATA TYPE text;
 ALTER TABLE pt1 ALTER COLUMN c1 SET STATISTICS 10000;
@@ -1395,26 +1222,10 @@ ALTER TABLE pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
  c6     | integer | not null  | plain    |              | 
  c7     | integer |           | plain    |              | 
  c8     | text    |           | external |              | 
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    | 10000        | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
- c4     | integer | default 0 |             | plain    |              | 
- c5     | integer |           |             | plain    |              | 
- c6     | integer | not null  |             | plain    |              | 
- c7     | integer |           |             | plain    |              | 
- c8     | text    |           |             | external |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Child tables: ct3,
-              ft3
-
 -- drop attributes recursively
 ALTER TABLE pt1 DROP COLUMN c4;
 ALTER TABLE pt1 DROP COLUMN c5;
@@ -1428,21 +1239,10 @@ ALTER TABLE pt1 DROP COLUMN c8;
  c1     | integer | not null  | plain    | 10000        | 
  c2     | text    |           | extended |              | 
  c3     | date    |           | plain    |              | 
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    | 10000        | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Child tables: ct3,
-              ft3
-
 -- add constraints recursively
 ALTER TABLE pt1 ADD CONSTRAINT pt1chk1 CHECK (c1 > 0) NO INHERIT;
 ALTER TABLE pt1 ADD CONSTRAINT pt1chk2 CHECK (c2 <> '');
@@ -1468,42 +1268,27 @@ SELECT relname, conname, contype, conislocal, coninhcount, connoinherit
 Check constraints:
     "pt1chk1" CHECK (c1 > 0) NO INHERIT
     "pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    | 10000        | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Child tables: ct3,
-              ft3
-
 DROP FOREIGN TABLE ft2; -- ERROR
-ERROR:  cannot drop foreign table ft2 because other objects depend on it
-DETAIL:  table ct3 depends on foreign table ft2
-foreign table ft3 depends on foreign table ft2
-HINT:  Use DROP ... CASCADE to drop the dependent objects too.
+ERROR:  foreign table "ft2" does not exist
 DROP FOREIGN TABLE ft2 CASCADE;
-NOTICE:  drop cascades to 2 other objects
-DETAIL:  drop cascades to table ct3
-drop cascades to foreign table ft3
+ERROR:  foreign table "ft2" does not exist
 CREATE FOREIGN TABLE ft2 (
        c1 integer NOT NULL,
        c2 text,
        c3 date
 ) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
+ERROR:  server "s0" does not exist
 -- child must have parent's INHERIT constraints
 ALTER FOREIGN TABLE ft2 INHERIT pt1;                            -- ERROR
-ERROR:  child table is missing constraint "pt1chk2"
+ERROR:  relation "ft2" does not exist
 ALTER FOREIGN TABLE ft2 ADD CONSTRAINT pt1chk2 CHECK (c2 <> '');
+ERROR:  relation "ft2" does not exist
 ALTER FOREIGN TABLE ft2 INHERIT pt1;
+ERROR:  relation "ft2" does not exist
 -- child does not inherit NO INHERIT constraints
 \d+ pt1
                           Table "public.pt1"
@@ -1515,21 +1300,10 @@ ALTER FOREIGN TABLE ft2 INHERIT pt1;
 Check constraints:
     "pt1chk1" CHECK (c1 > 0) NO INHERIT
     "pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 -- drop constraints recursively
 ALTER TABLE pt1 DROP CONSTRAINT pt1chk1 CASCADE;
 ALTER TABLE pt1 DROP CONSTRAINT pt1chk2 CASCADE;
@@ -1545,22 +1319,10 @@ ALTER TABLE pt1 ADD CONSTRAINT pt1chk3 CHECK (c2 <> '') NOT VALID;
  c3     | date    |           | plain    |              | 
 Check constraints:
     "pt1chk3" CHECK (c2 <> ''::text) NOT VALID
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-    "pt1chk3" CHECK (c2 <> ''::text) NOT VALID
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 -- VALIDATE CONSTRAINT need do nothing on foreign tables
 ALTER TABLE pt1 VALIDATE CONSTRAINT pt1chk3;
 \d+ pt1
@@ -1572,22 +1334,10 @@ ALTER TABLE pt1 VALIDATE CONSTRAINT pt1chk3;
  c3     | date    |           | plain    |              | 
 Check constraints:
     "pt1chk3" CHECK (c2 <> ''::text)
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-    "pt1chk3" CHECK (c2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 -- OID system column
 ALTER TABLE pt1 SET WITH OIDS;
 \d+ pt1
@@ -1599,26 +1349,13 @@ ALTER TABLE pt1 SET WITH OIDS;
  c3     | date    |           | plain    |              | 
 Check constraints:
     "pt1chk3" CHECK (c2 <> ''::text)
-Child tables: ft2
 Has OIDs: yes
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-    "pt1chk3" CHECK (c2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-Has OIDs: yes
-
 ALTER TABLE ft2 SET WITHOUT OIDS;  -- ERROR
-ERROR:  cannot drop inherited column "oid"
+ERROR:  relation "ft2" does not exist
 ALTER TABLE pt1 SET WITHOUT OIDS;
 \d+ pt1
                           Table "public.pt1"
@@ -1629,22 +1366,10 @@ ALTER TABLE pt1 SET WITHOUT OIDS;
  c3     | date    |           | plain    |              | 
 Check constraints:
     "pt1chk3" CHECK (c2 <> ''::text)
-Child tables: ft2
+Distribute By: HASH(c1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- c1     | integer | not null  |             | plain    |              | 
- c2     | text    |           |             | extended |              | 
- c3     | date    |           |             | plain    |              | 
-Check constraints:
-    "pt1chk2" CHECK (c2 <> ''::text)
-    "pt1chk3" CHECK (c2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 -- changes name of an attribute recursively
 ALTER TABLE pt1 RENAME COLUMN c1 TO f1;
 ALTER TABLE pt1 RENAME COLUMN c2 TO f2;
@@ -1660,39 +1385,25 @@ ALTER TABLE pt1 RENAME CONSTRAINT pt1chk3 TO f2_check;
  f3     | date    |           | plain    |              | 
 Check constraints:
     "f2_check" CHECK (f2 <> ''::text)
-Child tables: ft2
+Distribute By: HASH(f1)
+Location Nodes: ALL DATANODES
 
 \d+ ft2
-                             Foreign table "public.ft2"
- Column |  Type   | Modifiers | FDW Options | Storage  | Stats target | Description 
---------+---------+-----------+-------------+----------+--------------+-------------
- f1     | integer | not null  |             | plain    |              | 
- f2     | text    |           |             | extended |              | 
- f3     | date    |           |             | plain    |              | 
-Check constraints:
-    "f2_check" CHECK (f2 <> ''::text)
-    "pt1chk2" CHECK (f2 <> ''::text)
-Server: s0
-FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: pt1
-
 -- TRUNCATE doesn't work on foreign tables, either directly or recursively
 TRUNCATE ft2;  -- ERROR
-ERROR:  "ft2" is not a table
+ERROR:  relation "ft2" does not exist
 TRUNCATE pt1;  -- ERROR
-ERROR:  "ft2" is not a table
 DROP TABLE pt1 CASCADE;
-NOTICE:  drop cascades to foreign table ft2
 -- IMPORT FOREIGN SCHEMA
 IMPORT FOREIGN SCHEMA s1 FROM SERVER s9 INTO public; -- ERROR
-ERROR:  foreign-data wrapper "foo" has no handler
+ERROR:  server "s9" does not exist
 IMPORT FOREIGN SCHEMA s1 LIMIT TO (t1) FROM SERVER s9 INTO public; --ERROR
-ERROR:  foreign-data wrapper "foo" has no handler
+ERROR:  server "s9" does not exist
 IMPORT FOREIGN SCHEMA s1 EXCEPT (t1) FROM SERVER s9 INTO public; -- ERROR
-ERROR:  foreign-data wrapper "foo" has no handler
+ERROR:  server "s9" does not exist
 IMPORT FOREIGN SCHEMA s1 EXCEPT (t1, t2) FROM SERVER s9 INTO public
 OPTIONS (option1 'value1', option2 'value2'); -- ERROR
-ERROR:  foreign-data wrapper "foo" has no handler
+ERROR:  server "s9" does not exist
 -- DROP FOREIGN TABLE
 DROP FOREIGN TABLE no_table;                                    -- ERROR
 ERROR:  foreign table "no_table" does not exist
@@ -1700,38 +1411,34 @@ DROP FOREIGN TABLE IF EXISTS no_table;
 NOTICE:  foreign table "no_table" does not exist, skipping
 DROP FOREIGN TABLE foreign_schema.foreign_table_1;
 ERROR:  foreign table "foreign_table_1" does not exist
+-- REASSIGN OWNED/DROP OWNED of foreign objects
+REASSIGN OWNED BY regress_test_role TO regress_test_role2;
+DROP OWNED BY regress_test_role2;
+DROP OWNED BY regress_test_role2 CASCADE;
 -- Cleanup
 DROP SCHEMA foreign_schema CASCADE;
 DROP ROLE regress_test_role;                                -- ERROR
-ERROR:  role "regress_test_role" cannot be dropped because some objects depend on it
-DETAIL:  privileges for server s4
-privileges for foreign-data wrapper foo
-owner of user mapping for regress_test_role on server s6
 DROP SERVER t1 CASCADE;
-NOTICE:  drop cascades to user mapping for public on server t1
-DROP SERVER t2;
-ERROR:  server "t2" does not exist
+ERROR:  server "t1" does not exist
 DROP USER MAPPING FOR regress_test_role SERVER s6;
 ERROR:  role "regress_test_role" does not exist
 -- This test causes some order dependent cascade detail output,
--- so switch to terse mode for it. 
+-- so switch to terse mode for it.
 \set VERBOSITY terse
 DROP FOREIGN DATA WRAPPER foo CASCADE;
 ERROR:  foreign-data wrapper "foo" does not exist
 \set VERBOSITY default
 DROP SERVER s8 CASCADE;
-NOTICE:  drop cascades to 2 other objects
-DETAIL:  drop cascades to user mapping for regress_foreign_data_user on server s8
-drop cascades to user mapping for public on server s8
+ERROR:  server "s8" does not exist
 DROP ROLE regress_test_indirect;
 ERROR:  role "regress_test_indirect" does not exist
 DROP ROLE regress_test_role;
 ERROR:  role "regress_test_role" does not exist
-DROP ROLE unprivileged_role;                                -- ERROR
-REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM unprivileged_role;
+DROP ROLE regress_unprivileged_role;                        -- ERROR
+REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM regress_unprivileged_role;
 ERROR:  foreign-data wrapper "postgresql" does not exist
-DROP ROLE unprivileged_role;
-ERROR:  role "unprivileged_role" does not exist
+DROP ROLE regress_unprivileged_role;
+ERROR:  role "regress_unprivileged_role" does not exist
 DROP ROLE regress_test_role2;
 DROP FOREIGN DATA WRAPPER postgresql CASCADE;
 ERROR:  foreign-data wrapper "postgresql" does not exist
diff --git a/src/test/regress/expected/foreign_data_1.out b/src/test/regress/expected/foreign_data_1.out
deleted file mode 100644 (file)
index 541b058..0000000
+++ /dev/null
@@ -1,1464 +0,0 @@
---
--- Test foreign-data wrapper and server management.
---
--- Clean up in case a prior regression run failed
--- Suppress NOTICE messages when roles don't exist
-SET client_min_messages TO 'error';
-DROP ROLE IF EXISTS foreign_data_user, regress_test_role, regress_test_role2, regress_test_role_super, regress_test_indirect, unpriviled_role;
-RESET client_min_messages;
-CREATE ROLE foreign_data_user LOGIN SUPERUSER;
-SET SESSION AUTHORIZATION 'foreign_data_user';
-CREATE ROLE regress_test_role;
-CREATE ROLE regress_test_role2;
-CREATE ROLE regress_test_role_super SUPERUSER;
-CREATE ROLE regress_test_indirect;
-CREATE ROLE unprivileged_role;
-CREATE FOREIGN DATA WRAPPER dummy;
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-COMMENT ON FOREIGN DATA WRAPPER dummy IS 'useless';
-ERROR:  foreign-data wrapper "dummy" does not exist
-CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
--- At this point we should have 2 built-in wrappers and no servers.
-SELECT fdwname, fdwhandler::regproc, fdwvalidator::regproc, fdwoptions FROM pg_foreign_data_wrapper ORDER BY 1, 2, 3;
- fdwname | fdwhandler | fdwvalidator | fdwoptions 
----------+------------+--------------+------------
-(0 rows)
-
-SELECT srvname, srvoptions FROM pg_foreign_server;
- srvname | srvoptions 
----------+------------
-(0 rows)
-
-SELECT * FROM pg_user_mapping;
- umuser | umserver | umoptions 
---------+----------+-----------
-(0 rows)
-
--- CREATE FOREIGN DATA WRAPPER
-CREATE FOREIGN DATA WRAPPER foo VALIDATOR bar;            -- ERROR
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-CREATE FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-\dew
-   List of foreign-data wrappers
- Name | Owner | Handler | Validator 
-------+-------+---------+-----------
-(0 rows)
-
-CREATE FOREIGN DATA WRAPPER foo; -- duplicate
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-DROP FOREIGN DATA WRAPPER foo;
-ERROR:  foreign-data wrapper "foo" does not exist
-CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1');
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-DROP FOREIGN DATA WRAPPER foo;
-ERROR:  foreign-data wrapper "foo" does not exist
-CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', testing '2');   -- ERROR
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', another '2');
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-DROP FOREIGN DATA WRAPPER foo;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE regress_test_role;
-CREATE FOREIGN DATA WRAPPER foo; -- ERROR
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
--- ALTER FOREIGN DATA WRAPPER
-ALTER FOREIGN DATA WRAPPER foo;                             -- ERROR
-ERROR:  syntax error at or near ";"
-LINE 1: ALTER FOREIGN DATA WRAPPER foo;
-                                      ^
-ALTER FOREIGN DATA WRAPPER foo VALIDATOR bar;               -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo NO VALIDATOR;
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (SET c '4');         -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP c);            -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4');
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '2');
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (b '4');             -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-SET ROLE regress_test_role;
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5');         -- ERROR
-ERROR:  permission denied to alter foreign-data wrapper "foo"
-HINT:  Must be superuser to alter a foreign-data wrapper.
-SET ROLE regress_test_role_super;
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5');
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role;  -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role_super;
-ERROR:  foreign-data wrapper "foo" does not exist
-ALTER ROLE regress_test_role_super NOSUPERUSER;
-SET ROLE regress_test_role_super;
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD e '6');         -- ERROR
-ERROR:  permission denied to alter foreign-data wrapper "foo"
-HINT:  Must be superuser to alter a foreign-data wrapper.
-RESET ROLE;
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo RENAME TO foo1;
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-ALTER FOREIGN DATA WRAPPER foo1 RENAME TO foo;
-ERROR:  foreign-data wrapper "foo1" does not exist
--- DROP FOREIGN DATA WRAPPER
-DROP FOREIGN DATA WRAPPER nonexistent;                      -- ERROR
-ERROR:  foreign-data wrapper "nonexistent" does not exist
-DROP FOREIGN DATA WRAPPER IF EXISTS nonexistent;
-NOTICE:  foreign-data wrapper "nonexistent" does not exist, skipping
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-DROP ROLE regress_test_role_super;                          -- ERROR
-SET ROLE regress_test_role_super;
-ERROR:  role "regress_test_role_super" does not exist
-DROP FOREIGN DATA WRAPPER foo;
-ERROR:  foreign-data wrapper "foo" does not exist
-RESET ROLE;
-DROP ROLE regress_test_role_super;
-ERROR:  role "regress_test_role_super" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-CREATE FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s1 FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-COMMENT ON SERVER s1 IS 'foreign server';
-ERROR:  server "s1" does not exist
-CREATE USER MAPPING FOR current_user SERVER s1;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-\deu+
-      List of user mappings
- Server | User name | FDW Options 
---------+-----------+-------------
-(0 rows)
-
-DROP FOREIGN DATA WRAPPER foo;                              -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE regress_test_role;
-DROP FOREIGN DATA WRAPPER foo CASCADE;                      -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-RESET ROLE;
-DROP FOREIGN DATA WRAPPER foo CASCADE;
-ERROR:  foreign-data wrapper "foo" does not exist
-\dew+
-                           List of foreign-data wrappers
- Name | Owner | Handler | Validator | Access privileges | FDW Options | Description 
-------+-------+---------+-----------+-------------------+-------------+-------------
-(0 rows)
-
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-\deu+
-      List of user mappings
- Server | User name | FDW Options 
---------+-----------+-------------
-(0 rows)
-
--- exercise CREATE SERVER
-CREATE SERVER s1 FOREIGN DATA WRAPPER foo;                  -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE FOREIGN DATA WRAPPER foo OPTIONS ("test wrapper" 'true');
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s1 FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s1 FOREIGN DATA WRAPPER foo;                  -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s2 FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s3 TYPE 'oracle' FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s4 TYPE 'oracle' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s5 VERSION '15.0' FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s6 VERSION '16.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s7 TYPE 'oracle' VERSION '17.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbname 's8db');
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-SET ROLE regress_test_role;
-CREATE SERVER t1 FOREIGN DATA WRAPPER foo;                 -- ERROR: no usage on FDW
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE regress_test_role;
-CREATE SERVER t1 FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_test_role;
-ERROR:  foreign-data wrapper "foo" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE regress_test_role;
-CREATE SERVER t2 FOREIGN DATA WRAPPER foo;                 -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-GRANT regress_test_indirect TO regress_test_role;
-SET ROLE regress_test_role;
-CREATE SERVER t2 FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-RESET ROLE;
-REVOKE regress_test_indirect FROM regress_test_role;
--- ALTER SERVER
-ALTER SERVER s0;                                            -- ERROR
-ERROR:  syntax error at or near ";"
-LINE 1: ALTER SERVER s0;
-                       ^
-ALTER SERVER s0 OPTIONS (a '1');                            -- ERROR
-ERROR:  server "s0" does not exist
-ALTER SERVER s1 VERSION '1.0' OPTIONS (servername 's1');
-ERROR:  server "s1" does not exist
-ALTER SERVER s2 VERSION '1.1';
-ERROR:  server "s2" does not exist
-ALTER SERVER s3 OPTIONS ("tns name" 'orcl', port '1521');
-ERROR:  server "s3" does not exist
-GRANT USAGE ON FOREIGN SERVER s1 TO regress_test_role;
-ERROR:  server "s1" does not exist
-GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
-ERROR:  server "s6" does not exist
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-SET ROLE regress_test_role;
-ALTER SERVER s1 VERSION '1.1';                              -- ERROR
-ERROR:  server "s1" does not exist
-ALTER SERVER s1 OWNER TO regress_test_role;                 -- ERROR
-ERROR:  server "s1" does not exist
-RESET ROLE;
-ALTER SERVER s1 OWNER TO regress_test_role;
-ERROR:  server "s1" does not exist
-GRANT regress_test_role2 TO regress_test_role;
-SET ROLE regress_test_role;
-ALTER SERVER s1 VERSION '1.1';
-ERROR:  server "s1" does not exist
-ALTER SERVER s1 OWNER TO regress_test_role2;                -- ERROR
-ERROR:  server "s1" does not exist
-RESET ROLE;
-ALTER SERVER s8 OPTIONS (foo '1');                          -- ERROR option validation
-ERROR:  server "s8" does not exist
-ALTER SERVER s8 OPTIONS (connect_timeout '30', SET dbname 'db1', DROP host);
-ERROR:  server "s8" does not exist
-SET ROLE regress_test_role;
-ALTER SERVER s1 OWNER TO regress_test_indirect;             -- ERROR
-ERROR:  server "s1" does not exist
-RESET ROLE;
-GRANT regress_test_indirect TO regress_test_role;
-SET ROLE regress_test_role;
-ALTER SERVER s1 OWNER TO regress_test_indirect;
-ERROR:  server "s1" does not exist
-RESET ROLE;
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE regress_test_role;
-ALTER SERVER s1 OWNER TO regress_test_indirect;
-ERROR:  server "s1" does not exist
-RESET ROLE;
-DROP ROLE regress_test_indirect;                            -- ERROR
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-ALTER SERVER s8 RENAME to s8new;
-ERROR:  server "s8" does not exist
-\des+
-                                       List of foreign servers
- Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description 
-------+-------+----------------------+-------------------+------+---------+-------------+-------------
-(0 rows)
-
-ALTER SERVER s8new RENAME to s8;
-ERROR:  server "s8new" does not exist
--- DROP SERVER
-DROP SERVER nonexistent;                                    -- ERROR
-ERROR:  server "nonexistent" does not exist
-DROP SERVER IF EXISTS nonexistent;
-NOTICE:  server "nonexistent" does not exist, skipping
-\des
-       List of foreign servers
- Name | Owner | Foreign-data wrapper 
-------+-------+----------------------
-(0 rows)
-
-SET ROLE regress_test_role;
-DROP SERVER s2;                                             -- ERROR
-ERROR:  server "s2" does not exist
-DROP SERVER s1;
-ERROR:  server "s1" does not exist
-RESET ROLE;
-\des
-       List of foreign servers
- Name | Owner | Foreign-data wrapper 
-------+-------+----------------------
-(0 rows)
-
-ALTER SERVER s2 OWNER TO regress_test_role;
-ERROR:  server "s2" does not exist
-SET ROLE regress_test_role;
-DROP SERVER s2;
-ERROR:  server "s2" does not exist
-RESET ROLE;
-\des
-       List of foreign servers
- Name | Owner | Foreign-data wrapper 
-------+-------+----------------------
-(0 rows)
-
-CREATE USER MAPPING FOR current_user SERVER s3;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-\deu
-List of user mappings
- Server | User name 
---------+-----------
-(0 rows)
-
-DROP SERVER s3;                                             -- ERROR
-ERROR:  server "s3" does not exist
-DROP SERVER s3 CASCADE;
-ERROR:  server "s3" does not exist
-\des
-       List of foreign servers
- Name | Owner | Foreign-data wrapper 
-------+-------+----------------------
-(0 rows)
-
-\deu
-List of user mappings
- Server | User name 
---------+-----------
-(0 rows)
-
--- CREATE USER MAPPING
-CREATE USER MAPPING FOR regress_test_missing_role SERVER s1;  -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR current_user SERVER s1;             -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR current_user SERVER s4;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR user SERVER s4;                     -- ERROR duplicate
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public');
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 'secret');    -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR user SERVER s8 OPTIONS (user 'test', password 'secret');
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-ALTER SERVER s5 OWNER TO regress_test_role;
-ERROR:  server "s5" does not exist
-ALTER SERVER s6 OWNER TO regress_test_indirect;
-ERROR:  role "regress_test_indirect" does not exist
-SET ROLE regress_test_role;
-CREATE USER MAPPING FOR current_user SERVER s5;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR current_user SERVER s6 OPTIONS (username 'test');
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR current_user SERVER s7;             -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR public SERVER s8;                   -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-ALTER SERVER t1 OWNER TO regress_test_indirect;
-ERROR:  role "regress_test_indirect" does not exist
-SET ROLE regress_test_role;
-CREATE USER MAPPING FOR current_user SERVER t1 OPTIONS (username 'bob', password 'boo');
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR public SERVER t1;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-RESET ROLE;
-\deu
-List of user mappings
- Server | User name 
---------+-----------
-(0 rows)
-
--- ALTER USER MAPPING
-ALTER USER MAPPING FOR regress_test_missing_role SERVER s4 OPTIONS (gotcha 'true'); -- ERROR
-ERROR:  role "regress_test_missing_role" does not exist
-ALTER USER MAPPING FOR user SERVER ss4 OPTIONS (gotcha 'true'); -- ERROR
-ERROR:  server "ss4" does not exist
-ALTER USER MAPPING FOR public SERVER s5 OPTIONS (gotcha 'true');            -- ERROR
-ERROR:  server "s5" does not exist
-ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (username 'test');    -- ERROR
-ERROR:  server "s8" does not exist
-ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (DROP user, SET password 'public');
-ERROR:  server "s8" does not exist
-SET ROLE regress_test_role;
-ALTER USER MAPPING FOR current_user SERVER s5 OPTIONS (ADD modified '1');
-ERROR:  server "s5" does not exist
-ALTER USER MAPPING FOR public SERVER s4 OPTIONS (ADD modified '1'); -- ERROR
-ERROR:  server "s4" does not exist
-ALTER USER MAPPING FOR public SERVER t1 OPTIONS (ADD modified '1');
-ERROR:  server "t1" does not exist
-RESET ROLE;
-\deu+
-      List of user mappings
- Server | User name | FDW Options 
---------+-----------+-------------
-(0 rows)
-
--- DROP USER MAPPING
-DROP USER MAPPING FOR regress_test_missing_role SERVER s4;  -- ERROR
-ERROR:  role "regress_test_missing_role" does not exist
-DROP USER MAPPING FOR user SERVER ss4;
-ERROR:  server "ss4" does not exist
-DROP USER MAPPING FOR public SERVER s7;                     -- ERROR
-ERROR:  server "s7" does not exist
-DROP USER MAPPING IF EXISTS FOR regress_test_missing_role SERVER s4;
-NOTICE:  role "regress_test_missing_role" does not exist, skipping
-DROP USER MAPPING IF EXISTS FOR user SERVER ss4;
-NOTICE:  server does not exist, skipping
-DROP USER MAPPING IF EXISTS FOR public SERVER s7;
-NOTICE:  server does not exist, skipping
-CREATE USER MAPPING FOR public SERVER s8;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-SET ROLE regress_test_role;
-DROP USER MAPPING FOR public SERVER s8;                     -- ERROR
-ERROR:  server "s8" does not exist
-RESET ROLE;
-DROP SERVER s7;
-ERROR:  server "s7" does not exist
-\deu
-List of user mappings
- Server | User name 
---------+-----------
-(0 rows)
-
--- CREATE FOREIGN TABLE
-CREATE SCHEMA foreign_schema;
-CREATE SERVER s0 FOREIGN DATA WRAPPER dummy;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-CREATE FOREIGN TABLE ft1 ();                                    -- ERROR
-ERROR:  syntax error at or near ";"
-LINE 1: CREATE FOREIGN TABLE ft1 ();
-                                   ^
-CREATE FOREIGN TABLE ft1 () SERVER no_server;                   -- ERROR
-ERROR:  server "no_server" does not exist
-CREATE FOREIGN TABLE ft1 () SERVER s0 WITH OIDS;                -- ERROR
-ERROR:  syntax error at or near "WITH"
-LINE 1: CREATE FOREIGN TABLE ft1 () SERVER s0 WITH OIDS;
-                                              ^
-CREATE FOREIGN TABLE ft1 (
-       c1 integer OPTIONS ("param 1" 'val1') PRIMARY KEY,
-       c2 text OPTIONS (param2 'val2', param3 'val3'),
-       c3 date
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR
-ERROR:  primary key constraints are not supported on foreign tables
-LINE 2:  c1 integer OPTIONS ("param 1" 'val1') PRIMARY KEY,
-                                               ^
-CREATE TABLE ref_table (id integer PRIMARY KEY);
-CREATE FOREIGN TABLE ft1 (
-       c1 integer OPTIONS ("param 1" 'val1') REFERENCES ref_table (id),
-       c2 text OPTIONS (param2 'val2', param3 'val3'),
-       c3 date
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR
-ERROR:  foreign key constraints are not supported on foreign tables
-LINE 2:  c1 integer OPTIONS ("param 1" 'val1') REFERENCES ref_table ...
-                                               ^
-DROP TABLE ref_table;
-CREATE FOREIGN TABLE ft1 (
-       c1 integer OPTIONS ("param 1" 'val1') NOT NULL,
-       c2 text OPTIONS (param2 'val2', param3 'val3'),
-       c3 date,
-       UNIQUE (c3)
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR
-ERROR:  unique constraints are not supported on foreign tables
-LINE 5:  UNIQUE (c3)
-         ^
-CREATE FOREIGN TABLE ft1 (
-       c1 integer OPTIONS ("param 1" 'val1') NOT NULL,
-       c2 text OPTIONS (param2 'val2', param3 'val3') CHECK (c2 <> ''),
-       c3 date,
-       CHECK (c3 BETWEEN '1994-01-01'::date AND '1994-01-31'::date)
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
-ERROR:  server "s0" does not exist
-COMMENT ON FOREIGN TABLE ft1 IS 'ft1';
-ERROR:  relation "ft1" does not exist
-COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
-ERROR:  relation "ft1" does not exist
-\d+ ft1
-\det+
-               List of foreign tables
- Schema | Table | Server | FDW Options | Description 
---------+-------+--------+-------------+-------------
-(0 rows)
-
-CREATE INDEX id_ft1_c2 ON ft1 (c2);                             -- ERROR
-ERROR:  relation "ft1" does not exist
-SELECT * FROM ft1;                                              -- ERROR
-ERROR:  relation "ft1" does not exist
-LINE 1: SELECT * FROM ft1;
-                      ^
-EXPLAIN SELECT * FROM ft1;                                      -- ERROR
-ERROR:  relation "ft1" does not exist
-LINE 1: EXPLAIN SELECT * FROM ft1;
-                              ^
--- ALTER FOREIGN TABLE
-COMMENT ON FOREIGN TABLE ft1 IS 'foreign table';
-ERROR:  relation "ft1" does not exist
-COMMENT ON FOREIGN TABLE ft1 IS NULL;
-ERROR:  relation "ft1" does not exist
-COMMENT ON COLUMN ft1.c1 IS 'foreign column';
-ERROR:  relation "ft1" does not exist
-COMMENT ON COLUMN ft1.c1 IS NULL;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c4 integer;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c5 integer DEFAULT 0;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c6 integer;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c7 integer NOT NULL;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c8 integer;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c9 integer;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1');
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0'; -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN xmin OPTIONS (ADD p1 'v1'); -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2 'v2'),
-                        ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2 'v2');
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET STATISTICS 10000;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100);
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN;
-ERROR:  relation "ft1" does not exist
-\d+ ft1
--- can't change the column type if it's used elsewhere
-CREATE TABLE use_ft1_column_type (x ft1);
-ERROR:  type "ft1" does not exist
-LINE 1: CREATE TABLE use_ft1_column_type (x ft1);
-                                            ^
-ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE integer; -- ERROR
-ERROR:  relation "ft1" does not exist
-DROP TABLE use_ft1_column_type;
-ERROR:  table "use_ft1_column_type" does not exist
-ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7);                   -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP CONSTRAINT no_const;               -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP CONSTRAINT IF EXISTS no_const;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 SET WITH OIDS;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 OWNER TO regress_test_role;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape '@');
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP COLUMN no_column;                  -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP COLUMN IF EXISTS no_column;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 DROP COLUMN c9;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 SET SCHEMA foreign_schema;
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE ft1 SET TABLESPACE ts;                      -- ERROR
-ERROR:  relation "ft1" does not exist
-ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1;
-ERROR:  relation "foreign_schema.ft1" does not exist
-ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
-ERROR:  relation "foreign_schema.ft1" does not exist
-\d foreign_schema.foreign_table_1
--- alter noexisting table
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c4 integer;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c6 integer;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c7 integer NOT NULL;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c8 integer;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c9 integer;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1');
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c6 SET NOT NULL;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 DROP NOT NULL;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 TYPE char(10);
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 SET DATA TYPE text;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2 'v2'),
-                        ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2 'v2');
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT IF EXISTS no_const;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT ft1_c1_check;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 OWNER TO regress_test_role;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape '@');
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN IF EXISTS no_column;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN c9;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 SET SCHEMA foreign_schema;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 RENAME c1 TO foreign_column_1;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
-ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 RENAME TO foreign_table_1;
-NOTICE:  relation "doesnt_exist_ft1" does not exist, skipping
--- Information schema
-SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2;
- foreign_data_wrapper_catalog | foreign_data_wrapper_name | authorization_identifier | library_name | foreign_data_wrapper_language 
-------------------------------+---------------------------+--------------------------+--------------+-------------------------------
-(0 rows)
-
-SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY 1, 2, 3;
- foreign_data_wrapper_catalog | foreign_data_wrapper_name | option_name | option_value 
-------------------------------+---------------------------+-------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
- foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier 
-------------------------+---------------------+------------------------------+---------------------------+---------------------+------------------------+--------------------------
-(0 rows)
-
-SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3;
- foreign_server_catalog | foreign_server_name | option_name | option_value 
-------------------------+---------------------+-------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.user_mappings ORDER BY lower(authorization_identifier), 2, 3;
- authorization_identifier | foreign_server_catalog | foreign_server_name 
---------------------------+------------------------+---------------------
-(0 rows)
-
-SELECT * FROM information_schema.user_mapping_options ORDER BY lower(authorization_identifier), 2, 3, 4;
- authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value 
---------------------------+------------------------+---------------------+-------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
- grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
----------+---------+----------------+---------------+-------------+-------------+----------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
- grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
----------+---------+----------------+---------------+-------------+-------------+----------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.foreign_tables ORDER BY 1, 2, 3;
- foreign_table_catalog | foreign_table_schema | foreign_table_name | foreign_server_catalog | foreign_server_name 
------------------------+----------------------+--------------------+------------------------+---------------------
-(0 rows)
-
-SELECT * FROM information_schema.foreign_table_options ORDER BY 1, 2, 3, 4;
- foreign_table_catalog | foreign_table_schema | foreign_table_name | option_name | option_value 
------------------------+----------------------+--------------------+-------------+--------------
-(0 rows)
-
-SET ROLE regress_test_role;
-SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
- authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value 
---------------------------+------------------------+---------------------+-------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
- grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
----------+---------+----------------+---------------+-------------+-------------+----------------+--------------
-(0 rows)
-
-SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5;
- grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable 
----------+---------+----------------+---------------+-------------+-------------+----------------+--------------
-(0 rows)
-
-DROP USER MAPPING FOR current_user SERVER t1;
-ERROR:  server "t1" does not exist
-SET ROLE regress_test_role2;
-SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
- authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value 
---------------------------+------------------------+---------------------+-------------+--------------
-(0 rows)
-
-RESET ROLE;
--- has_foreign_data_wrapper_privilege
-SELECT has_foreign_data_wrapper_privilege('regress_test_role',
-    (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE');
- has_foreign_data_wrapper_privilege 
-------------------------------------
-(1 row)
-
-SELECT has_foreign_data_wrapper_privilege('regress_test_role', 'foo', 'USAGE');
-ERROR:  foreign-data wrapper "foo" does not exist
-SELECT has_foreign_data_wrapper_privilege(
-    (SELECT oid FROM pg_catalog.pg_roles WHERE rolname='regress_test_role'),
-    (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE');
- has_foreign_data_wrapper_privilege 
-------------------------------------
-(1 row)
-
-SELECT has_foreign_data_wrapper_privilege(
-    (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE');
- has_foreign_data_wrapper_privilege 
-------------------------------------
-(1 row)
-
-SELECT has_foreign_data_wrapper_privilege(
-    (SELECT oid FROM pg_catalog.pg_roles WHERE rolname='regress_test_role'), 'foo', 'USAGE');
-ERROR:  foreign-data wrapper "foo" does not exist
-SELECT has_foreign_data_wrapper_privilege('foo', 'USAGE');
-ERROR:  foreign-data wrapper "foo" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;
-ERROR:  foreign-data wrapper "foo" does not exist
-SELECT has_foreign_data_wrapper_privilege('regress_test_role', 'foo', 'USAGE');
-ERROR:  foreign-data wrapper "foo" does not exist
--- has_server_privilege
-SELECT has_server_privilege('regress_test_role',
-    (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE');
- has_server_privilege 
-----------------------
-(1 row)
-
-SELECT has_server_privilege('regress_test_role', 's8', 'USAGE');
-ERROR:  server "s8" does not exist
-SELECT has_server_privilege(
-    (SELECT oid FROM pg_catalog.pg_roles WHERE rolname='regress_test_role'),
-    (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE');
- has_server_privilege 
-----------------------
-(1 row)
-
-SELECT has_server_privilege(
-    (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE');
- has_server_privilege 
-----------------------
-(1 row)
-
-SELECT has_server_privilege(
-    (SELECT oid FROM pg_catalog.pg_roles WHERE rolname='regress_test_role'), 's8', 'USAGE');
-ERROR:  server "s8" does not exist
-SELECT has_server_privilege('s8', 'USAGE');
-ERROR:  server "s8" does not exist
-GRANT USAGE ON FOREIGN SERVER s8 TO regress_test_role;
-ERROR:  server "s8" does not exist
-SELECT has_server_privilege('regress_test_role', 's8', 'USAGE');
-ERROR:  server "s8" does not exist
-REVOKE USAGE ON FOREIGN SERVER s8 FROM regress_test_role;
-ERROR:  server "s8" does not exist
-GRANT USAGE ON FOREIGN SERVER s4 TO regress_test_role;
-ERROR:  server "s4" does not exist
-DROP USER MAPPING FOR public SERVER s4;
-ERROR:  server "s4" does not exist
-ALTER SERVER s6 OPTIONS (DROP host, DROP dbname);
-ERROR:  server "s6" does not exist
-ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (DROP username);
-ERROR:  server "s6" does not exist
-ALTER FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;
-ERROR:  foreign-data wrapper "foo" does not exist
--- Privileges
-SET ROLE unprivileged_role;
-CREATE FOREIGN DATA WRAPPER foobar;                             -- ERROR
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true');         -- ERROR
-ERROR:  permission denied to alter foreign-data wrapper "foo"
-HINT:  Must be superuser to alter a foreign-data wrapper.
-ALTER FOREIGN DATA WRAPPER foo OWNER TO unprivileged_role;      -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-DROP FOREIGN DATA WRAPPER foo;                                  -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;   -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-CREATE SERVER s9 FOREIGN DATA WRAPPER foo;                      -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-ALTER SERVER s4 VERSION '0.5';                                  -- ERROR
-ERROR:  server "s4" does not exist
-ALTER SERVER s4 OWNER TO unprivileged_role;                     -- ERROR
-ERROR:  server "s4" does not exist
-DROP SERVER s4;                                                 -- ERROR
-ERROR:  server "s4" does not exist
-GRANT USAGE ON FOREIGN SERVER s4 TO regress_test_role;          -- ERROR
-ERROR:  server "s4" does not exist
-CREATE USER MAPPING FOR public SERVER s4;                       -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (gotcha 'true'); -- ERROR
-ERROR:  server "s6" does not exist
-DROP USER MAPPING FOR regress_test_role SERVER s6;              -- ERROR
-ERROR:  server "s6" does not exist
-RESET ROLE;
-GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO unprivileged_role;
-ERROR:  foreign-data wrapper "postgresql" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO unprivileged_role WITH GRANT OPTION;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE unprivileged_role;
-CREATE FOREIGN DATA WRAPPER foobar;                             -- ERROR
-ERROR:  Postgres-XL does not support FOREIGN DATA WRAPPER yet
-DETAIL:  The feature is not currently supported
-ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true');         -- ERROR
-ERROR:  permission denied to alter foreign-data wrapper "foo"
-HINT:  Must be superuser to alter a foreign-data wrapper.
-DROP FOREIGN DATA WRAPPER foo;                                  -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_test_role; -- WARNING
-ERROR:  foreign-data wrapper "postgresql" does not exist
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;
-ERROR:  foreign-data wrapper "foo" does not exist
-CREATE SERVER s9 FOREIGN DATA WRAPPER postgresql;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-ALTER SERVER s6 VERSION '0.5';                                  -- ERROR
-ERROR:  server "s6" does not exist
-DROP SERVER s6;                                                 -- ERROR
-ERROR:  server "s6" does not exist
-GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role;          -- ERROR
-ERROR:  server "s6" does not exist
-GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role;
-ERROR:  server "s9" does not exist
-CREATE USER MAPPING FOR public SERVER s6;                       -- ERROR
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-CREATE USER MAPPING FOR public SERVER s9;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (gotcha 'true'); -- ERROR
-ERROR:  server "s6" does not exist
-DROP USER MAPPING FOR regress_test_role SERVER s6;              -- ERROR
-ERROR:  server "s6" does not exist
-RESET ROLE;
-REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM unprivileged_role; -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM unprivileged_role CASCADE;
-ERROR:  foreign-data wrapper "foo" does not exist
-SET ROLE unprivileged_role;
-GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;   -- ERROR
-ERROR:  foreign-data wrapper "foo" does not exist
-CREATE SERVER s10 FOREIGN DATA WRAPPER foo;                     -- ERROR
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-ALTER SERVER s9 VERSION '1.1';
-ERROR:  server "s9" does not exist
-GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role;
-ERROR:  server "s9" does not exist
-CREATE USER MAPPING FOR current_user SERVER s9;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-DROP SERVER s9 CASCADE;
-ERROR:  server "s9" does not exist
-RESET ROLE;
-CREATE SERVER s9 FOREIGN DATA WRAPPER foo;
-ERROR:  Postgres-XL does not support SERVER yet
-DETAIL:  The feature is not currently supported
-GRANT USAGE ON FOREIGN SERVER s9 TO unprivileged_role;
-ERROR:  server "s9" does not exist
-SET ROLE unprivileged_role;
-ALTER SERVER s9 VERSION '1.2';                                  -- ERROR
-ERROR:  server "s9" does not exist
-GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role;          -- WARNING
-ERROR:  server "s9" does not exist
-CREATE USER MAPPING FOR current_user SERVER s9;
-ERROR:  Postgres-XL does not support USER MAPPING yet
-DETAIL:  The feature is not currently supported
-DROP SERVER s9 CASCADE;                                         -- ERROR
-ERROR:  server "s9" does not exist
-RESET ROLE;
--- Triggers
-CREATE FUNCTION dummy_trigger() RETURNS TRIGGER AS $$
-  BEGIN
-    RETURN NULL;
-  END
-$$ language plpgsql;
-CREATE TRIGGER trigtest_before_stmt BEFORE INSERT OR UPDATE OR DELETE
-ON foreign_schema.foreign_table_1
-FOR EACH STATEMENT
-EXECUTE PROCEDURE dummy_trigger();
-ERROR:  Postgres-XL does not support TRIGGER yet
-DETAIL:  The feature is not currently supported
-CREATE TRIGGER trigtest_after_stmt AFTER INSERT OR UPDATE OR DELETE
-ON foreign_schema.foreign_table_1
-FOR EACH STATEMENT
-EXECUTE PROCEDURE dummy_trigger();
-ERROR:  Postgres-XL does not support TRIGGER yet
-DETAIL:  The feature is not currently supported
-CREATE TRIGGER trigtest_before_row BEFORE INSERT OR UPDATE OR DELETE
-ON foreign_schema.foreign_table_1
-FOR EACH ROW
-EXECUTE PROCEDURE dummy_trigger();
-ERROR:  Postgres-XL does not support TRIGGER yet
-DETAIL:  The feature is not currently supported
-CREATE TRIGGER trigtest_after_row AFTER INSERT OR UPDATE OR DELETE
-ON foreign_schema.foreign_table_1
-FOR EACH ROW
-EXECUTE PROCEDURE dummy_trigger();
-ERROR:  Postgres-XL does not support TRIGGER yet
-DETAIL:  The feature is not currently supported
-CREATE CONSTRAINT TRIGGER trigtest_constraint AFTER INSERT OR UPDATE OR DELETE
-ON foreign_schema.foreign_table_1
-FOR EACH ROW
-EXECUTE PROCEDURE dummy_trigger();
-ERROR:  Postgres-XL does not support TRIGGER yet
-DETAIL:  The feature is not currently supported
-ALTER FOREIGN TABLE foreign_schema.foreign_table_1
-       DISABLE TRIGGER trigtest_before_stmt;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-ALTER FOREIGN TABLE foreign_schema.foreign_table_1
-       ENABLE TRIGGER trigtest_before_stmt;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-DROP TRIGGER trigtest_before_stmt ON foreign_schema.foreign_table_1;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-DROP TRIGGER trigtest_before_row ON foreign_schema.foreign_table_1;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-DROP TRIGGER trigtest_after_stmt ON foreign_schema.foreign_table_1;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-DROP TRIGGER trigtest_after_row ON foreign_schema.foreign_table_1;
-ERROR:  relation "foreign_schema.foreign_table_1" does not exist
-DROP FUNCTION dummy_trigger();
--- Table inheritance
-CREATE TABLE pt1 (
-       c1 integer NOT NULL,
-       c2 text,
-       c3 date
-);
-CREATE FOREIGN TABLE ft2 () INHERITS (pt1)
-  SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
-ERROR:  server "s0" does not exist
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
-DROP FOREIGN TABLE ft2;
-ERROR:  foreign table "ft2" does not exist
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-CREATE FOREIGN TABLE ft2 (
-       c1 integer NOT NULL,
-       c2 text,
-       c3 date
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
-ERROR:  server "s0" does not exist
-\d+ ft2
-ALTER FOREIGN TABLE ft2 INHERIT pt1;
-ERROR:  relation "ft2" does not exist
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
-CREATE TABLE ct3() INHERITS(ft2);
-ERROR:  relation "ft2" does not exist
-CREATE FOREIGN TABLE ft3 (
-       c1 integer NOT NULL,
-       c2 text,
-       c3 date
-) INHERITS(ft2)
-  SERVER s0;
-ERROR:  relation "ft2" does not exist
-\d+ ft2
-\d+ ct3
-\d+ ft3
--- add attributes recursively
-ALTER TABLE pt1 ADD COLUMN c4 integer;
-ALTER TABLE pt1 ADD COLUMN c5 integer DEFAULT 0;
-ALTER TABLE pt1 ADD COLUMN c6 integer;
-ALTER TABLE pt1 ADD COLUMN c7 integer NOT NULL;
-ALTER TABLE pt1 ADD COLUMN c8 integer;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    |              | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
- c4     | integer |           | plain    |              | 
- c5     | integer | default 0 | plain    |              | 
- c6     | integer |           | plain    |              | 
- c7     | integer | not null  | plain    |              | 
- c8     | integer |           | plain    |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
-\d+ ct3
-\d+ ft3
--- alter attributes recursively
-ALTER TABLE pt1 ALTER COLUMN c4 SET DEFAULT 0;
-ALTER TABLE pt1 ALTER COLUMN c5 DROP DEFAULT;
-ALTER TABLE pt1 ALTER COLUMN c6 SET NOT NULL;
-ALTER TABLE pt1 ALTER COLUMN c7 DROP NOT NULL;
-ALTER TABLE pt1 ALTER COLUMN c8 TYPE char(10) USING '0';        -- ERROR
-ALTER TABLE pt1 ALTER COLUMN c8 TYPE char(10);
-ALTER TABLE pt1 ALTER COLUMN c8 SET DATA TYPE text;
-ALTER TABLE pt1 ALTER COLUMN c1 SET STATISTICS 10000;
-ALTER TABLE pt1 ALTER COLUMN c1 SET (n_distinct = 100);
-ALTER TABLE pt1 ALTER COLUMN c8 SET STATISTICS -1;
-ALTER TABLE pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
- c4     | integer | default 0 | plain    |              | 
- c5     | integer |           | plain    |              | 
- c6     | integer | not null  | plain    |              | 
- c7     | integer |           | plain    |              | 
- c8     | text    |           | external |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- drop attributes recursively
-ALTER TABLE pt1 DROP COLUMN c4;
-ALTER TABLE pt1 DROP COLUMN c5;
-ALTER TABLE pt1 DROP COLUMN c6;
-ALTER TABLE pt1 DROP COLUMN c7;
-ALTER TABLE pt1 DROP COLUMN c8;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- add constraints recursively
-ALTER TABLE pt1 ADD CONSTRAINT pt1chk1 CHECK (c1 > 0) NO INHERIT;
-ALTER TABLE pt1 ADD CONSTRAINT pt1chk2 CHECK (c2 <> '');
--- connoinherit should be true for NO INHERIT constraint
-SELECT relname, conname, contype, conislocal, coninhcount, connoinherit
-  FROM pg_class AS pc JOIN pg_constraint AS pgc ON (conrelid = pc.oid)
-  WHERE pc.relname = 'pt1'
-  ORDER BY 1,2;
- relname | conname | contype | conislocal | coninhcount | connoinherit 
----------+---------+---------+------------+-------------+--------------
- pt1     | pt1chk1 | c       | t          |           0 | t
- pt1     | pt1chk2 | c       | t          |           0 | f
-(2 rows)
-
--- child does not inherit NO INHERIT constraints
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk1" CHECK (c1 > 0) NO INHERIT
-    "pt1chk2" CHECK (c2 <> ''::text)
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
-DROP FOREIGN TABLE ft2; -- ERROR
-ERROR:  foreign table "ft2" does not exist
-DROP FOREIGN TABLE ft2 CASCADE;
-ERROR:  foreign table "ft2" does not exist
-CREATE FOREIGN TABLE ft2 (
-       c1 integer NOT NULL,
-       c2 text,
-       c3 date
-) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
-ERROR:  server "s0" does not exist
--- child must have parent's INHERIT constraints
-ALTER FOREIGN TABLE ft2 INHERIT pt1;                            -- ERROR
-ERROR:  relation "ft2" does not exist
-ALTER FOREIGN TABLE ft2 ADD CONSTRAINT pt1chk2 CHECK (c2 <> '');
-ERROR:  relation "ft2" does not exist
-ALTER FOREIGN TABLE ft2 INHERIT pt1;
-ERROR:  relation "ft2" does not exist
--- child does not inherit NO INHERIT constraints
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk1" CHECK (c1 > 0) NO INHERIT
-    "pt1chk2" CHECK (c2 <> ''::text)
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- drop constraints recursively
-ALTER TABLE pt1 DROP CONSTRAINT pt1chk1 CASCADE;
-ALTER TABLE pt1 DROP CONSTRAINT pt1chk2 CASCADE;
--- NOT VALID case
-INSERT INTO pt1 VALUES (1, 'pt1'::text, '1994-01-01'::date);
-ALTER TABLE pt1 ADD CONSTRAINT pt1chk3 CHECK (c2 <> '') NOT VALID;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk3" CHECK (c2 <> ''::text) NOT VALID
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- VALIDATE CONSTRAINT need do nothing on foreign tables
-ALTER TABLE pt1 VALIDATE CONSTRAINT pt1chk3;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk3" CHECK (c2 <> ''::text)
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- OID system column
-ALTER TABLE pt1 SET WITH OIDS;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk3" CHECK (c2 <> ''::text)
-Has OIDs: yes
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
-ALTER TABLE ft2 SET WITHOUT OIDS;  -- ERROR
-ERROR:  relation "ft2" does not exist
-ALTER TABLE pt1 SET WITHOUT OIDS;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- c1     | integer | not null  | plain    | 10000        | 
- c2     | text    |           | extended |              | 
- c3     | date    |           | plain    |              | 
-Check constraints:
-    "pt1chk3" CHECK (c2 <> ''::text)
-Distribute By: HASH(c1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- changes name of an attribute recursively
-ALTER TABLE pt1 RENAME COLUMN c1 TO f1;
-ALTER TABLE pt1 RENAME COLUMN c2 TO f2;
-ALTER TABLE pt1 RENAME COLUMN c3 TO f3;
--- changes name of a constraint recursively
-ALTER TABLE pt1 RENAME CONSTRAINT pt1chk3 TO f2_check;
-\d+ pt1
-                          Table "public.pt1"
- Column |  Type   | Modifiers | Storage  | Stats target | Description 
---------+---------+-----------+----------+--------------+-------------
- f1     | integer | not null  | plain    | 10000        | 
- f2     | text    |           | extended |              | 
- f3     | date    |           | plain    |              | 
-Check constraints:
-    "f2_check" CHECK (f2 <> ''::text)
-Distribute By: HASH(f1)
-Location Nodes: ALL DATANODES
-
-\d+ ft2
--- TRUNCATE doesn't work on foreign tables, either directly or recursively
-TRUNCATE ft2;  -- ERROR
-ERROR:  relation "ft2" does not exist
-TRUNCATE pt1;  -- ERROR
-DROP TABLE pt1 CASCADE;
--- IMPORT FOREIGN SCHEMA
-IMPORT FOREIGN SCHEMA s1 FROM SERVER s9 INTO public; -- ERROR
-ERROR:  server "s9" does not exist
-IMPORT FOREIGN SCHEMA s1 LIMIT TO (t1) FROM SERVER s9 INTO public; --ERROR
-ERROR:  server "s9" does not exist
-IMPORT FOREIGN SCHEMA s1 EXCEPT (t1) FROM SERVER s9 INTO public; -- ERROR
-ERROR:  server "s9" does not exist
-IMPORT FOREIGN SCHEMA s1 EXCEPT (t1, t2) FROM SERVER s9 INTO public
-OPTIONS (option1 'value1', option2 'value2'); -- ERROR
-ERROR:  server "s9" does not exist
--- DROP FOREIGN TABLE
-DROP FOREIGN TABLE no_table;                                    -- ERROR
-ERROR:  foreign table "no_table" does not exist
-DROP FOREIGN TABLE IF EXISTS no_table;
-NOTICE:  foreign table "no_table" does not exist, skipping
-DROP FOREIGN TABLE foreign_schema.foreign_table_1;
-ERROR:  foreign table "foreign_table_1" does not exist
--- Cleanup
-DROP SCHEMA foreign_schema CASCADE;
-DROP ROLE regress_test_role;                                -- ERROR
-DROP SERVER s5 CASCADE;
-ERROR:  server "s5" does not exist
-DROP SERVER t1 CASCADE;
-ERROR:  server "t1" does not exist
-DROP SERVER t2;
-ERROR:  server "t2" does not exist
-DROP USER MAPPING FOR regress_test_role SERVER s6;
-ERROR:  role "regress_test_role" does not exist
--- This test causes some order dependent cascade detail output,
--- so switch to terse mode for it.
-\set VERBOSITY terse
-DROP FOREIGN DATA WRAPPER foo CASCADE;
-ERROR:  foreign-data wrapper "foo" does not exist
-\set VERBOSITY default
-DROP SERVER s8 CASCADE;
-ERROR:  server "s8" does not exist
-DROP ROLE regress_test_indirect;
-ERROR:  role "regress_test_indirect" does not exist
-DROP ROLE regress_test_role;
-ERROR:  role "regress_test_role" does not exist
-DROP ROLE unprivileged_role;                                -- ERROR
-REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM unprivileged_role;
-ERROR:  foreign-data wrapper "postgresql" does not exist
-DROP ROLE unprivileged_role;
-ERROR:  role "unprivileged_role" does not exist
-DROP ROLE regress_test_role2;
-DROP FOREIGN DATA WRAPPER postgresql CASCADE;
-ERROR:  foreign-data wrapper "postgresql" does not exist
-DROP FOREIGN DATA WRAPPER dummy CASCADE;
-ERROR:  foreign-data wrapper "dummy" does not exist
-\c
-DROP ROLE foreign_data_user;
--- At this point we should have no wrappers, no servers, and no mappings.
-SELECT fdwname, fdwhandler, fdwvalidator, fdwoptions FROM pg_foreign_data_wrapper;
- fdwname | fdwhandler | fdwvalidator | fdwoptions 
----------+------------+--------------+------------
-(0 rows)
-
-SELECT srvname, srvoptions FROM pg_foreign_server;
- srvname | srvoptions 
----------+------------
-(0 rows)
-
-SELECT * FROM pg_user_mapping;
- umuser | umserver | umoptions 
---------+----------+-----------
-(0 rows)
-