@@ -631,7 +631,7 @@ DROP SERVER s7;
631631
632632-- CREATE FOREIGN TABLE
633633CREATE SCHEMA foreign_schema;
634- CREATE SERVER sc FOREIGN DATA WRAPPER dummy;
634+ CREATE SERVER s0 FOREIGN DATA WRAPPER dummy;
635635CREATE FOREIGN TABLE ft1 (); -- ERROR
636636ERROR: syntax error at or near ";"
637637LINE 1: CREATE FOREIGN TABLE ft1 ();
@@ -641,15 +641,15 @@ ERROR: server "no_server" does not exist
641641CREATE FOREIGN TABLE ft1 (c1 serial) SERVER sc; -- ERROR
642642NOTICE: CREATE FOREIGN TABLE will create implicit sequence "ft1_c1_seq" for serial column "ft1.c1"
643643ERROR: default values on foreign tables are not supported
644- CREATE FOREIGN TABLE ft1 () SERVER sc WITH OIDS; -- ERROR
644+ CREATE FOREIGN TABLE ft1 () SERVER s0 WITH OIDS; -- ERROR
645645ERROR: syntax error at or near "WITH OIDS"
646- LINE 1: CREATE FOREIGN TABLE ft1 () SERVER sc WITH OIDS;
646+ LINE 1: CREATE FOREIGN TABLE ft1 () SERVER s0 WITH OIDS;
647647 ^
648648CREATE FOREIGN TABLE ft1 (
649649 c1 integer OPTIONS ("param 1" 'val1') NOT NULL,
650650 c2 text OPTIONS (param2 'val2', param3 'val3'),
651651 c3 date
652- ) SERVER sc OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
652+ ) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value');
653653COMMENT ON FOREIGN TABLE ft1 IS 'ft1';
654654COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
655655\d+ ft1
@@ -659,15 +659,15 @@ COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
659659 c1 | integer | not null | ("param 1" 'val1') | plain | ft1.c1
660660 c2 | text | | (param2 'val2', param3 'val3') | extended |
661661 c3 | date | | | plain |
662- Server: sc
662+ Server: s0
663663FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
664664Has OIDs: no
665665
666666\det+
667667 List of foreign tables
668668 Schema | Table | Server | FDW Options | Description
669669--------+-------+--------+-------------------------------------------------+-------------
670- public | ft1 | sc | (delimiter ',', quote '"', "be quoted" 'value') | ft1
670+ public | ft1 | s0 | (delimiter ',', quote '"', "be quoted" 'value') | ft1
671671(1 row)
672672
673673CREATE INDEX id_ft1_c2 ON ft1 (c2); -- ERROR
@@ -717,7 +717,7 @@ ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
717717 c8 | text | | (p2 'V2') | extended |
718718 c9 | integer | | | plain |
719719 c10 | integer | | (p1 'v1') | plain |
720- Server: sc
720+ Server: s0
721721FDW Options: (delimiter ',', quote '"', "be quoted" 'value')
722722Has OIDs: no
723723
@@ -760,7 +760,7 @@ ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
760760 c7 | integer | | (p1 'v1', p2 'v2')
761761 c8 | text | | (p2 'V2')
762762 c10 | integer | | (p1 'v1')
763- Server: sc
763+ Server: s0
764764FDW Options: (quote '~', "be quoted" 'value', escape '@')
765765
766766-- Information schema
@@ -781,11 +781,11 @@ SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY 1, 2, 3;
781781SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
782782 foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier
783783------------------------+---------------------+------------------------------+---------------------------+---------------------+------------------------+--------------------------
784+ regression | s0 | regression | dummy | | | foreign_data_user
784785 regression | s4 | regression | foo | oracle | | foreign_data_user
785786 regression | s5 | regression | foo | | 15.0 | regress_test_role
786787 regression | s6 | regression | foo | | 16.0 | regress_test_indirect
787788 regression | s8 | regression | postgresql | | | foreign_data_user
788- regression | sc | regression | dummy | | | foreign_data_user
789789 regression | t1 | regression | foo | | | regress_test_indirect
790790 regression | t2 | regression | foo | | | regress_test_role
791791(7 rows)
@@ -847,7 +847,7 @@ SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREI
847847SELECT * FROM information_schema.foreign_tables ORDER BY 1, 2, 3;
848848 foreign_table_catalog | foreign_table_schema | foreign_table_name | foreign_server_catalog | foreign_server_name
849849-----------------------+----------------------+--------------------+------------------------+---------------------
850- regression | foreign_schema | foreign_table_1 | regression | sc
850+ regression | foreign_schema | foreign_table_1 | regression | s0
851851(1 row)
852852
853853SELECT * FROM information_schema.foreign_table_options ORDER BY 1, 2, 3, 4;
@@ -1131,7 +1131,7 @@ DROP ROLE unprivileged_role;
11311131DROP ROLE regress_test_role2;
11321132DROP FOREIGN DATA WRAPPER postgresql CASCADE;
11331133DROP FOREIGN DATA WRAPPER dummy CASCADE;
1134- NOTICE: drop cascades to server sc
1134+ NOTICE: drop cascades to server s0
11351135\c
11361136DROP ROLE foreign_data_user;
11371137-- At this point we should have no wrappers, no servers, and no mappings.
0 commit comments